/*
This file is part of Ext JS 4.2

Copyright (c) 2011-2013 Sencha Inc

Contact:  http://www.sencha.com/contact

GNU General Public License Usage
This file may be used under the terms of the GNU General Public License version 3.0 as
published by the Free Software Foundation and appearing in the file LICENSE included in the
packaging of this file.

Please review the following information to ensure the GNU General Public License version 3.0
requirements will be met: http://www.gnu.org/copyleft/gpl.html.

If you are unsure which license is appropriate for your use, please contact the sales department
at http://www.sencha.com/contact.

Build date: 2013-03-11 22:33:40 (aed16176e68b5e8aa1433452b12805c0ad913836)
*/
var Ext=Ext||{};if(!Ext.Direct){Ext.Direct={}}if(!Ext.Toolbar){Ext.Toolbar={}}if(!Ext.app){Ext.app={}}if(!Ext.app.domain){Ext.app.domain={}}if(!Ext.button){Ext.button={}}if(!Ext.chart){Ext.chart={}}if(!Ext.chart.axis){Ext.chart.axis={}}if(!Ext.chart.series){Ext.chart.series={}}if(!Ext.chart.theme){Ext.chart.theme={}}if(!Ext.container){Ext.container={}}if(!Ext.core){Ext.core={}}if(!Ext.data){Ext.data={}}if(!Ext.data.association){Ext.data.association={}}if(!Ext.data.flash){Ext.data.flash={}}if(!Ext.data.proxy){Ext.data.proxy={}}if(!Ext.data.reader){Ext.data.reader={}}if(!Ext.data.writer){Ext.data.writer={}}if(!Ext.dd){Ext.dd={}}if(!Ext.direct){Ext.direct={}}if(!Ext.dom){Ext.dom={}}if(!Ext.draw){Ext.draw={}}if(!Ext.draw.engine){Ext.draw.engine={}}if(!Ext.flash){Ext.flash={}}if(!Ext.form){Ext.form={}}if(!Ext.form.Action){Ext.form.Action={}}if(!Ext.form.action){Ext.form.action={}}if(!Ext.form.field){Ext.form.field={}}if(!Ext.fx){Ext.fx={}}if(!Ext.fx.target){Ext.fx.target={}}if(!Ext.grid){Ext.grid={}}if(!Ext.grid.column){Ext.grid.column={}}if(!Ext.grid.feature){Ext.grid.feature={}}if(!Ext.grid.header){Ext.grid.header={}}if(!Ext.grid.locking){Ext.grid.locking={}}if(!Ext.grid.plugin){Ext.grid.plugin={}}if(!Ext.grid.property){Ext.grid.property={}}if(!Ext.layout){Ext.layout={}}if(!Ext.layout.boxOverflow){Ext.layout.boxOverflow={}}if(!Ext.layout.component){Ext.layout.component={}}if(!Ext.layout.component.field){Ext.layout.component.field={}}if(!Ext.layout.container){Ext.layout.container={}}if(!Ext.layout.container.boxOverflow){Ext.layout.container.boxOverflow={}}if(!Ext.list){Ext.list={}}if(!Ext.menu){Ext.menu={}}if(!Ext.panel){Ext.panel={}}if(!Ext.perf){Ext.perf={}}if(!Ext.picker){Ext.picker={}}if(!Ext.resizer){Ext.resizer={}}if(!Ext.rtl){Ext.rtl={}}if(!Ext.rtl.button){Ext.rtl.button={}}if(!Ext.rtl.dd){Ext.rtl.dd={}}if(!Ext.rtl.dom){Ext.rtl.dom={}}if(!Ext.rtl.form){Ext.rtl.form={}}if(!Ext.rtl.form.field){Ext.rtl.form.field={}}if(!Ext.rtl.grid){Ext.rtl.grid={}}if(!Ext.rtl.grid.column){Ext.rtl.grid.column={}}if(!Ext.rtl.grid.plugin){Ext.rtl.grid.plugin={}}if(!Ext.rtl.layout){Ext.rtl.layout={}}if(!Ext.rtl.layout.component){Ext.rtl.layout.component={}}if(!Ext.rtl.layout.component.field){Ext.rtl.layout.component.field={}}if(!Ext.rtl.layout.container){Ext.rtl.layout.container={}}if(!Ext.rtl.layout.container.boxOverflow){Ext.rtl.layout.container.boxOverflow={}}if(!Ext.rtl.panel){Ext.rtl.panel={}}if(!Ext.rtl.resizer){Ext.rtl.resizer={}}if(!Ext.rtl.slider){Ext.rtl.slider={}}if(!Ext.rtl.tab){Ext.rtl.tab={}}if(!Ext.rtl.tree){Ext.rtl.tree={}}if(!Ext.rtl.util){Ext.rtl.util={}}if(!Ext.rtl.view){Ext.rtl.view={}}if(!Ext.selection){Ext.selection={}}if(!Ext.slider){Ext.slider={}}if(!Ext.state){Ext.state={}}if(!Ext.tab){Ext.tab={}}if(!Ext.tip){Ext.tip={}}if(!Ext.toolbar){Ext.toolbar={}}if(!Ext.tree){Ext.tree={}}if(!Ext.tree.plugin){Ext.tree.plugin={}}if(!Ext.util){Ext.util={}}if(!Ext.ux){Ext.ux={}}if(!Ext.ux.form){Ext.ux.form={}}if(!Ext.view){Ext.view={}}if(!Ext.window){Ext.window={}}(function(i){var k=[],l=["constructor","toString","valueOf","toLocaleString"],j={},o={},b=0,h,c,n,g,a=function(){var q,p;c=Ext.Base;n=Ext.ClassManager;for(q=l.length;q-->0;){p=(1<<q);o[j[p]=l[q]]=p}for(q in o){b|=o[q]}b=~b;Function.prototype.$isFunction=1;g=Ext.Class.getPreprocessor("config").fn;for(h in c){if(c.hasOwnProperty(h)){k.push(h)}}i.derive=d;return d.apply(this,arguments)},e=function(x,t,w){var q=w.enumerableMembers,u=x.prototype,s,v,r,p;if(!t){return}for(s in t){p=t[s];if(p&&p.$isFunction&&!p.$isClass&&p!==Ext.emptyFn&&p!==Ext.identityFn){u[s]=v=p;v.$owner=x;v.$name=s}else{u[s]=p}}for(r=1;q;r<<=1){if(q&r){q&=~r;s=j[r];u[s]=v=t[s];v.$owner=x;v.$name=s}}},m=function(t){var p=function s(){return t.apply(this,arguments)||null},r,q;p.prototype=Ext.Object.chain(t.prototype);for(r=k.length;r-->0;){q=k[r];p[q]=c[q]}return p},d=function(u,x,Q,p,w,E,v,N,s,G,A){var q=function z(){return this.constructor.apply(this,arguments)||null},P=q,r={enumerableMembers:p&b,onCreated:A,onBeforeCreated:e,aliases:N},D=Q.alternateClassName||[],L=Ext.global,H,K,M,C,J,T,S,t,I,y,O,F,B,R;for(M=k.length;M-->0;){S=k[M];q[S]=c[S]}if(Q.$isFunction){Q=Q(q)}r.data=Q;y=Q.statics,Q.$className=u;if(Q.$className){q.$className=Q.$className}q.extend(x);I=q.prototype;q.xtype=Q.xtype=w[0];if(w){I.xtypes=w}I.xtypesChain=E;I.xtypesMap=v;Q.alias=N;P.triggerExtended(q,Q,r);if(Q.onClassExtended){q.onExtended(Q.onClassExtended,q);delete Q.onClassExtended}if(y){for(O in y){if(y.hasOwnProperty(O)){R=y[O];if(R&&R.$isFunction&&!R.$isClass&&R!==Ext.emptyFn&&R!==Ext.identityFn){q[O]=B=R;B.$owner=q;B.$name=O}q[O]=R}}}delete Q.statics;if(Q.inheritableStatics){q.addInheritableStatics(Q.inheritableStatics)}if(I.onClassExtended){P.onExtended(I.onClassExtended,P);delete I.onClassExtended}if(Q.config){g(q,Q)}r.onBeforeCreated(q,r.data,r);for(M=0,J=s&&s.length;M<J;++M){q.mixin.apply(q,s[M])}for(M=0,J=N.length;M<J;M++){H=N[M];n.setAlias(q,H)}if(Q.singleton){P=new q()}if(!(D instanceof Array)){D=[D]}for(M=0,C=D.length;M<C;M++){K=D[M];n.classes[K]=P;F=n.getName(P);t=n.maps.nameToAlternates;if(F&&F!==K){n.maps.alternateToName[K]=F;D=t[F]||(t[F]=[]);D.push(K)}}for(M=0,J=G.length;M<J;M+=2){T=G[M];if(!T){T=L}T[G[M+1]]=P}n.classes[q.$classname]=P;F=n.getName(P);t=n.maps.nameToAlternates;if(F&&F!==u){n.maps.alternateToName[u]=F;D=t[F]||(t[F]=[]);D.push(u)}delete I.alternateClassName;if(r.onCreated){r.onCreated.call(P,P)}if(u){n.triggerCreated(u)}return P};i.derive=a}(Ext.cmd={}));var Ext=Ext||{};Ext._startTime=new Date().getTime();(function(){var a=this,c=Object.prototype,b=c.toString,k=true,l={toString:1},e=function(){},j=function(){var i=j.caller.caller;return i.$owner.prototype[i.$name].apply(this,arguments)},d,h=/\S/,g;Function.prototype.$extIsFunction=true;Ext.global=a;for(d in l){k=null}if(k){k=["hasOwnProperty","valueOf","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","constructor"]}Ext.enumerables=k;Ext.apply=function(p,o,r){if(r){Ext.apply(p,r)}if(p&&o&&typeof o==="object"){var q,n,m;for(q in o){p[q]=o[q]}if(k){for(n=k.length;n--;){m=k[n];if(o.hasOwnProperty(m)){p[m]=o[m]}}}}return p};Ext.buildSettings=Ext.apply({baseCSSPrefix:"x-"},Ext.buildSettings||{});Ext.apply(Ext,{name:Ext.sandboxName||"Ext",emptyFn:e,identityFn:function(i){return i},emptyString:new String(),baseCSSPrefix:Ext.buildSettings.baseCSSPrefix,applyIf:function(m,i){var n;if(m){for(n in i){if(m[n]===undefined){m[n]=i[n]}}}return m},iterate:function(i,n,m){if(Ext.isEmpty(i)){return}if(m===undefined){m=i}if(Ext.isIterable(i)){Ext.Array.each.call(Ext.Array,i,n,m)}else{Ext.Object.each.call(Ext.Object,i,n,m)}}});Ext.apply(Ext,{extend:(function(){var i=c.constructor,m=function(p){for(var n in p){if(!p.hasOwnProperty(n)){continue}this[n]=p[n]}};return function(n,s,q){if(Ext.isObject(s)){q=s;s=n;n=q.constructor!==i?q.constructor:function(){s.apply(this,arguments)}}var p=function(){},o,r=s.prototype;p.prototype=r;o=n.prototype=new p();o.constructor=n;n.superclass=r;if(r.constructor===i){r.constructor=s}n.override=function(t){Ext.override(n,t)};o.override=m;o.proto=o;n.override(q);n.extend=function(t){return Ext.extend(n,t)};return n}}()),override:function(o,p){if(o.$isClass){o.override(p)}else{if(typeof o=="function"){Ext.apply(o.prototype,p)}else{var i=o.self,m,n;if(i&&i.$isClass){for(m in p){if(p.hasOwnProperty(m)){n=p[m];if(typeof n=="function"){n.$name=m;n.$owner=i;n.$previous=o.hasOwnProperty(m)?o[m]:j}o[m]=n}}}else{Ext.apply(o,p)}}}return o}});Ext.apply(Ext,{valueFrom:function(n,i,m){return Ext.isEmpty(n,m)?i:n},typeOf:function(m){var i,n;if(m===null){return"null"}i=typeof m;if(i==="undefined"||i==="string"||i==="number"||i==="boolean"){return i}n=b.call(m);switch(n){case"[object Array]":return"array";case"[object Date]":return"date";case"[object Boolean]":return"boolean";case"[object Number]":return"number";case"[object RegExp]":return"regexp"}if(i==="function"){return"function"}if(i==="object"){if(m.nodeType!==undefined){if(m.nodeType===3){return(h).test(m.nodeValue)?"textnode":"whitespace"}else{return"element"}}return"object"}},coerce:function(p,o){var n=Ext.typeOf(p),m=Ext.typeOf(o),i=typeof p==="string";if(n!==m){switch(m){case"string":return String(p);case"number":return Number(p);case"boolean":return i&&(!p||p==="false")?false:Boolean(p);case"null":return i&&(!p||p==="null")?null:p;case"undefined":return i&&(!p||p==="undefined")?undefined:p;case"date":return i&&isNaN(p)?Ext.Date.parse(p,Ext.Date.defaultFormat):Date(Number(p))}}return p},isEmpty:function(i,m){return(i===null)||(i===undefined)||(!m?i==="":false)||(Ext.isArray(i)&&i.length===0)},isArray:("isArray" in Array)?Array.isArray:function(i){return b.call(i)==="[object Array]"},isDate:function(i){return b.call(i)==="[object Date]"},isObject:(b.call(null)==="[object Object]")?function(i){return i!==null&&i!==undefined&&b.call(i)==="[object Object]"&&i.ownerDocument===undefined}:function(i){return b.call(i)==="[object Object]"},isSimpleObject:function(i){return i instanceof Object&&i.constructor===Object},isPrimitive:function(m){var i=typeof m;return i==="string"||i==="number"||i==="boolean"},isFunction:function(i){return !!(i&&i.$extIsFunction)},isNumber:function(i){return typeof i==="number"&&isFinite(i)},isNumeric:function(i){return !isNaN(parseFloat(i))&&isFinite(i)},isString:function(i){return typeof i==="string"},isBoolean:function(i){return typeof i==="boolean"},isElement:function(i){return i?i.nodeType===1:false},isTextNode:function(i){return i?i.nodeName==="#text":false},isDefined:function(i){return typeof i!=="undefined"},isIterable:function(m){var i=typeof m,n=false;if(m&&i!="string"){if(i=="function"){if(Ext.isSafari){n=m instanceof NodeList||m instanceof HTMLCollection}}else{n=true}}return n?m.length!==undefined:false}});Ext.apply(Ext,{clone:function(r){var q,p,n,m,s,o;if(r===null||r===undefined){return r}if(r.nodeType&&r.cloneNode){return r.cloneNode(true)}q=b.call(r);if(q==="[object Date]"){return new Date(r.getTime())}if(q==="[object Array]"){p=r.length;s=[];while(p--){s[p]=Ext.clone(r[p])}}else{if(q==="[object Object]"&&r.constructor===Object){s={};for(o in r){s[o]=Ext.clone(r[o])}if(k){for(n=k.length;n--;){m=k[n];s[m]=r[m]}}}}return s||r},getUniqueGlobalNamespace:function(){var n=this.uniqueGlobalNamespace,m;if(n===undefined){m=0;do{n="ExtBox"+(++m)}while(Ext.global[n]!==undefined);Ext.global[n]=Ext;this.uniqueGlobalNamespace=n}return n},functionFactoryCache:{},cacheableFunctionFactory:function(){var q=this,n=Array.prototype.slice.call(arguments),m=q.functionFactoryCache,i,o,p;if(Ext.isSandboxed){p=n.length;if(p>0){p--;n[p]="var Ext=window."+Ext.name+";"+n[p]}}i=n.join("");o=m[i];if(!o){o=Function.prototype.constructor.apply(Function.prototype,n);m[i]=o}return o},functionFactory:function(){var n=this,i=Array.prototype.slice.call(arguments),m;if(Ext.isSandboxed){m=i.length;if(m>0){m--;i[m]="var Ext=window."+Ext.name+";"+i[m]}}return Function.prototype.constructor.apply(Function.prototype,i)},Logger:{verbose:e,log:e,info:e,warn:e,error:function(i){throw new Error(i)},deprecate:e}});Ext.type=Ext.typeOf;g=Ext.app;if(!g){g=Ext.app={}}Ext.apply(g,{namespaces:{},collectNamespaces:function(n){var i=Ext.app.namespaces,m;for(m in n){if(n.hasOwnProperty(m)){i[m]=true}}},addNamespaces:function(o){var p=Ext.app.namespaces,n,m;if(!Ext.isArray(o)){o=[o]}for(n=0,m=o.length;n<m;n++){p[o[n]]=true}},clearNamespaces:function(){Ext.app.namespaces={}},getNamespace:function(m){var o=Ext.app.namespaces,i="",n;for(n in o){if(o.hasOwnProperty(n)&&n.length>i.length&&(n+"."===m.substring(0,n.length+1))){i=n}}return i===""?undefined:i}})}());Ext.globalEval=Ext.global.execScript?function(a){execScript(a)}:function($$code){(function(){var Ext=this.Ext;eval($$code)}())};(function(){var a="4.2.0.663",b;Ext.Version=b=Ext.extend(Object,{constructor:function(c){var e,d;if(c instanceof b){return c}this.version=this.shortVersion=String(c).toLowerCase().replace(/_/g,".").replace(/[\-+]/g,"");d=this.version.search(/([^\d\.])/);if(d!==-1){this.release=this.version.substr(d,c.length);this.shortVersion=this.version.substr(0,d)}this.shortVersion=this.shortVersion.replace(/[^\d]/g,"");e=this.version.split(".");this.major=parseInt(e.shift()||0,10);this.minor=parseInt(e.shift()||0,10);this.patch=parseInt(e.shift()||0,10);this.build=parseInt(e.shift()||0,10);return this},toString:function(){return this.version},valueOf:function(){return this.version},getMajor:function(){return this.major||0},getMinor:function(){return this.minor||0},getPatch:function(){return this.patch||0},getBuild:function(){return this.build||0},getRelease:function(){return this.release||""},isGreaterThan:function(c){return b.compare(this.version,c)===1},isGreaterThanOrEqual:function(c){return b.compare(this.version,c)>=0},isLessThan:function(c){return b.compare(this.version,c)===-1},isLessThanOrEqual:function(c){return b.compare(this.version,c)<=0},equals:function(c){return b.compare(this.version,c)===0},match:function(c){c=String(c);return this.version.substr(0,c.length)===c},toArray:function(){return[this.getMajor(),this.getMinor(),this.getPatch(),this.getBuild(),this.getRelease()]},getShortVersion:function(){return this.shortVersion},gt:function(){return this.isGreaterThan.apply(this,arguments)},lt:function(){return this.isLessThan.apply(this,arguments)},gtEq:function(){return this.isGreaterThanOrEqual.apply(this,arguments)},ltEq:function(){return this.isLessThanOrEqual.apply(this,arguments)}});Ext.apply(b,{releaseValueMap:{dev:-6,alpha:-5,a:-5,beta:-4,b:-4,rc:-3,"#":-2,p:-1,pl:-1},getComponentValue:function(c){return !c?0:(isNaN(c)?this.releaseValueMap[c]||c:parseInt(c,10))},compare:function(h,g){var d,e,c;h=new b(h).toArray();g=new b(g).toArray();for(c=0;c<Math.max(h.length,g.length);c++){d=this.getComponentValue(h[c]);e=this.getComponentValue(g[c]);if(d<e){return -1}else{if(d>e){return 1}}}return 0}});Ext.apply(Ext,{versions:{},lastRegisteredVersion:null,setVersion:function(d,c){Ext.versions[d]=new b(c);Ext.lastRegisteredVersion=Ext.versions[d];return this},getVersion:function(c){if(c===undefined){return Ext.lastRegisteredVersion}return Ext.versions[c]},deprecate:function(c,e,g,d){if(b.compare(Ext.getVersion(c),e)<1){g.call(d)}}});Ext.setVersion("core",a)}());Ext.String=(function(){var j=/^[\x09\x0a\x0b\x0c\x0d\x20\xa0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u2028\u2029\u202f\u205f\u3000]+|[\x09\x0a\x0b\x0c\x0d\x20\xa0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u2028\u2029\u202f\u205f\u3000]+$/g,n=/('|\\)/g,i=/\{(\d+)\}/g,b=/([-.*+?\^${}()|\[\]\/\\])/g,o=/^\s+|\s+$/g,k=/\s+/,m=/(^[^a-z]*|[^\w])/gi,e,a,h,d,g=function(q,p){return e[p]},l=function(q,p){return(p in a)?a[p]:String.fromCharCode(parseInt(p.substr(2),10))},c=function(q,p){if(q===null||q===undefined||p===null||p===undefined){return false}return p.length<=q.length};return{insert:function(r,t,q){if(!r){return t}if(!t){return r}var p=r.length;if(!q&&q!==0){q=p}if(q<0){q*=-1;if(q>=p){q=0}else{q=p-q}}if(q===0){r=t+r}else{if(q>=r.length){r+=t}else{r=r.substr(0,q)+t+r.substr(q)}}return r},startsWith:function(r,t,q){var p=c(r,t);if(p){if(q){r=r.toLowerCase();t=t.toLowerCase()}p=r.lastIndexOf(t,0)===0}return p},endsWith:function(t,q,r){var p=c(t,q);if(p){if(r){t=t.toLowerCase();q=q.toLowerCase()}p=t.indexOf(q,t.length-q.length)!==-1}return p},createVarName:function(p){return p.replace(m,"")},htmlEncode:function(p){return(!p)?p:String(p).replace(h,g)},htmlDecode:function(p){return(!p)?p:String(p).replace(d,l)},addCharacterEntities:function(q){var p=[],t=[],r,s;for(r in q){s=q[r];a[r]=s;e[s]=r;p.push(s);t.push(r)}h=new RegExp("("+p.join("|")+")","g");d=new RegExp("("+t.join("|")+"|&#[0-9]{1,5};)","g")},resetCharacterEntities:function(){e={};a={};this.addCharacterEntities({"&amp;":"&","&gt;":">","&lt;":"<","&quot;":'"',"&#39;":"'"})},urlAppend:function(q,p){if(!Ext.isEmpty(p)){return q+(q.indexOf("?")===-1?"?":"&")+p}return q},trim:function(p){return p.replace(j,"")},capitalize:function(p){return p.charAt(0).toUpperCase()+p.substr(1)},uncapitalize:function(p){return p.charAt(0).toLowerCase()+p.substr(1)},ellipsis:function(r,p,s){if(r&&r.length>p){if(s){var t=r.substr(0,p-2),q=Math.max(t.lastIndexOf(" "),t.lastIndexOf("."),t.lastIndexOf("!"),t.lastIndexOf("?"));if(q!==-1&&q>=(p-15)){return t.substr(0,q)+"..."}}return r.substr(0,p-3)+"..."}return r},escapeRegex:function(p){return p.replace(b,"\\$1")},escape:function(p){return p.replace(n,"\\$1")},toggle:function(q,r,p){return q===r?p:r},leftPad:function(q,r,s){var p=String(q);s=s||" ";while(p.length<r){p=s+p}return p},format:function(q){var p=Ext.Array.toArray(arguments,1);return q.replace(i,function(r,s){return p[s]})},repeat:function(t,s,q){if(s<1){s=0}for(var p=[],r=s;r--;){p.push(t)}return p.join(q||"")},splitWords:function(p){if(p&&typeof p=="string"){return p.replace(o,"").split(k)}return p||[]}}}());Ext.String.resetCharacterEntities();Ext.htmlEncode=Ext.String.htmlEncode;Ext.htmlDecode=Ext.String.htmlDecode;Ext.urlAppend=Ext.String.urlAppend;Ext.Number=new function(){var b=this,c=(0.9).toFixed()!=="1",a=Math;Ext.apply(this,{constrain:function(h,g,e){var d=parseFloat(h);return(d<g)?g:((d>e)?e:d)},snap:function(h,e,g,i){var d;if(h===undefined||h<g){return g||0}if(e){d=h%e;if(d!==0){h-=d;if(d*2>=e){h+=e}else{if(d*2<-e){h-=e}}}}return b.constrain(h,g,i)},snapInRange:function(h,d,g,i){var e;g=(g||0);if(h===undefined||h<g){return g}if(d&&(e=((h-g)%d))){h-=e;e*=2;if(e>=d){h+=d}}if(i!==undefined){if(h>(i=b.snapInRange(i,d,g))){h=i}}return h},toFixed:c?function(g,d){d=d||0;var e=a.pow(10,d);return(a.round(g*e)/e).toFixed(d)}:function(e,d){return e.toFixed(d)},from:function(e,d){if(isFinite(e)){e=parseFloat(e)}return !isNaN(e)?e:d},randomInt:function(e,d){return a.floor(a.random()*(d-e+1)+e)},correctFloat:function(d){return parseFloat(d.toPrecision(14))}});Ext.num=function(){return b.from.apply(this,arguments)}};(function(){var g=Array.prototype,o=g.slice,q=(function(){var A=[],e,z=20;if(!A.splice){return false}while(z--){A.push("A")}A.splice(15,0,"F","F","F","F","F","F","F","F","F","F","F","F","F","F","F","F","F","F","F","F","F");e=A.length;A.splice(13,0,"XXX");if(e+1!=A.length){return false}return true}()),j="forEach" in g,u="map" in g,p="indexOf" in g,y="every" in g,c="some" in g,d="filter" in g,n=(function(){var e=[1,2,3,4,5].sort(function(){return 0});return e[0]===1&&e[1]===2&&e[2]===3&&e[3]===4&&e[4]===5}()),k=true,a,w,t,v;try{if(typeof document!=="undefined"){o.call(document.getElementsByTagName("body"))}}catch(s){k=false}function m(z,e){return(e<0)?Math.max(0,z.length+e):Math.min(z.length,e)}function x(G,F,z,J){var K=J?J.length:0,B=G.length,H=m(G,F),E,I,A,e,C,D;if(H===B){if(K){G.push.apply(G,J)}}else{E=Math.min(z,B-H);I=H+E;A=I+K-E;e=B-I;C=B-E;if(A<I){for(D=0;D<e;++D){G[A+D]=G[I+D]}}else{if(A>I){for(D=e;D--;){G[A+D]=G[I+D]}}}if(K&&H===C){G.length=C;G.push.apply(G,J)}else{G.length=C+K;for(D=0;D<K;++D){G[H+D]=J[D]}}}return G}function i(B,e,A,z){if(z&&z.length){if(e===0&&!A){B.unshift.apply(B,z)}else{if(e<B.length){B.splice.apply(B,[e,A].concat(z))}else{B.push.apply(B,z)}}}else{B.splice(e,A)}return B}function b(A,e,z){return x(A,e,z)}function r(A,e,z){A.splice(e,z);return A}function l(C,e,A){var B=m(C,e),z=C.slice(e,m(C,B+A));if(arguments.length<4){x(C,B,A)}else{x(C,B,A,o.call(arguments,3))}return z}function h(e){return e.splice.apply(e,o.call(arguments,1))}w=q?r:b;t=q?i:x;v=q?h:l;a=Ext.Array={each:function(D,B,A,e){D=a.from(D);var z,C=D.length;if(e!==true){for(z=0;z<C;z++){if(B.call(A||D[z],D[z],z,D)===false){return z}}}else{for(z=C-1;z>-1;z--){if(B.call(A||D[z],D[z],z,D)===false){return z}}}return true},forEach:j?function(A,z,e){A.forEach(z,e)}:function(C,A,z){var e=0,B=C.length;for(;e<B;e++){A.call(z,C[e],e,C)}},indexOf:p?function(A,e,z){return g.indexOf.call(A,e,z)}:function(C,A,B){var e,z=C.length;for(e=(B<0)?Math.max(0,z+B):B||0;e<z;e++){if(C[e]===A){return e}}return -1},contains:p?function(z,e){return g.indexOf.call(z,e)!==-1}:function(B,A){var e,z;for(e=0,z=B.length;e<z;e++){if(B[e]===A){return true}}return false},toArray:function(A,C,e){if(!A||!A.length){return[]}if(typeof A==="string"){A=A.split("")}if(k){return o.call(A,C||0,e||A.length)}var B=[],z;C=C||0;e=e?((e<0)?A.length+e:e):A.length;for(z=C;z<e;z++){B.push(A[z])}return B},pluck:function(D,e){var z=[],A,C,B;for(A=0,C=D.length;A<C;A++){B=D[A];z.push(B[e])}return z},map:u?function(A,z,e){return A.map(z,e)}:function(D,C,B){var A=[],z=0,e=D.length;for(;z<e;z++){A[z]=C.call(B,D[z],z,D)}return A},every:y?function(A,z,e){return A.every(z,e)}:function(C,A,z){var e=0,B=C.length;for(;e<B;++e){if(!A.call(z,C[e],e,C)){return false}}return true},some:c?function(A,z,e){return A.some(z,e)}:function(C,A,z){var e=0,B=C.length;for(;e<B;++e){if(A.call(z,C[e],e,C)){return true}}return false},equals:function(C,B){var z=C.length,e=B.length,A;if(C===B){return true}if(z!==e){return false}for(A=0;A<z;++A){if(C[A]!==B[A]){return false}}return true},clean:function(C){var z=[],e=0,B=C.length,A;for(;e<B;e++){A=C[e];if(!Ext.isEmpty(A)){z.push(A)}}return z},unique:function(C){var B=[],e=0,A=C.length,z;for(;e<A;e++){z=C[e];if(a.indexOf(B,z)===-1){B.push(z)}}return B},filter:d?function(A,z,e){return A.filter(z,e)}:function(D,B,A){var z=[],e=0,C=D.length;for(;e<C;e++){if(B.call(A,D[e],e,D)){z.push(D[e])}}return z},findBy:function(C,B,A){var z=0,e=C.length;for(;z<e;z++){if(B.call(A||C,C[z],z)){return C[z]}}return null},from:function(A,z){if(A===undefined||A===null){return[]}if(Ext.isArray(A)){return(z)?o.call(A):A}var e=typeof A;if(A&&A.length!==undefined&&e!=="string"&&(e!=="function"||!A.apply)){return a.toArray(A)}return[A]},remove:function(A,z){var e=a.indexOf(A,z);if(e!==-1){w(A,e,1)}return A},include:function(z,e){if(!a.contains(z,e)){z.push(e)}},clone:function(e){return o.call(e)},merge:function(){var e=o.call(arguments),B=[],z,A;for(z=0,A=e.length;z<A;z++){B=B.concat(e[z])}return a.unique(B)},intersect:function(){var e=[],A=o.call(arguments),L,J,F,I,M,B,z,H,K,C,G,E,D;if(!A.length){return e}L=A.length;for(G=M=0;G<L;G++){B=A[G];if(!I||B.length<I.length){I=B;M=G}}I=a.unique(I);w(A,M,1);z=I.length;L=A.length;for(G=0;G<z;G++){H=I[G];C=0;for(E=0;E<L;E++){J=A[E];F=J.length;for(D=0;D<F;D++){K=J[D];if(H===K){C++;break}}}if(C===L){e.push(H)}}return e},difference:function(z,e){var E=o.call(z),C=E.length,B,A,D;for(B=0,D=e.length;B<D;B++){for(A=0;A<C;A++){if(E[A]===e[B]){w(E,A,1);A--;C--}}}return E},slice:([1,2].slice(1,undefined).length?function(A,z,e){return o.call(A,z,e)}:function(A,z,e){if(typeof z==="undefined"){return o.call(A)}if(typeof e==="undefined"){return o.call(A,z)}return o.call(A,z,e)}),sort:n?function(z,e){if(e){return z.sort(e)}else{return z.sort()}}:function(F,E){var C=F.length,B=0,D,e,A,z;for(;B<C;B++){A=B;for(e=B+1;e<C;e++){if(E){D=E(F[e],F[A]);if(D<0){A=e}}else{if(F[e]<F[A]){A=e}}}if(A!==B){z=F[B];F[B]=F[A];F[A]=z}}return F},flatten:function(A){var z=[];function e(B){var D,E,C;for(D=0,E=B.length;D<E;D++){C=B[D];if(Ext.isArray(C)){e(C)}else{z.push(C)}}return z}return e(A)},min:function(D,C){var z=D[0],e,B,A;for(e=0,B=D.length;e<B;e++){A=D[e];if(C){if(C(z,A)===1){z=A}}else{if(A<z){z=A}}}return z},max:function(D,C){var e=D[0],z,B,A;for(z=0,B=D.length;z<B;z++){A=D[z];if(C){if(C(e,A)===-1){e=A}}else{if(A>e){e=A}}}return e},mean:function(e){return e.length>0?a.sum(e)/e.length:undefined},sum:function(C){var z=0,e,B,A;for(e=0,B=C.length;e<B;e++){A=C[e];z+=A}return z},toMap:function(C,e,A){var B={},z=C.length;if(!e){while(z--){B[C[z]]=z+1}}else{if(typeof e=="string"){while(z--){B[C[z][e]]=z+1}}else{while(z--){B[e.call(A,C[z])]=z+1}}}return B},toValueMap:function(C,e,A){var B={},z=C.length;if(!e){while(z--){B[C[z]]=C[z]}}else{if(typeof e=="string"){while(z--){B[C[z][e]]=C[z]}}else{while(z--){B[e.call(A,C[z])]=C[z]}}}return B},erase:w,insert:function(A,z,e){return t(A,z,0,e)},replace:t,splice:v,push:function(B){var e=arguments.length,A=1,z;if(B===undefined){B=[]}else{if(!Ext.isArray(B)){B=[B]}}for(;A<e;A++){z=arguments[A];Array.prototype.push[Ext.isIterable(z)?"apply":"call"](B,z)}return B}};Ext.each=a.each;a.union=a.merge;Ext.min=a.min;Ext.max=a.max;Ext.sum=a.sum;Ext.mean=a.mean;Ext.flatten=a.flatten;Ext.clean=a.clean;Ext.unique=a.unique;Ext.pluck=a.pluck;Ext.toArray=function(){return a.toArray.apply(a,arguments)}}());Ext.Function={flexSetter:function(a){return function(d,c){var e,g;if(d===null){return this}if(typeof d!=="string"){for(e in d){if(d.hasOwnProperty(e)){a.call(this,e,d[e])}}if(Ext.enumerables){for(g=Ext.enumerables.length;g--;){e=Ext.enumerables[g];if(d.hasOwnProperty(e)){a.call(this,e,d[e])}}}}else{a.call(this,d,c)}return this}},bind:function(d,c,b,a){if(arguments.length===2){return function(){return d.apply(c,arguments)}}var g=d,e=Array.prototype.slice;return function(){var h=b||arguments;if(a===true){h=e.call(arguments,0);h=h.concat(b)}else{if(typeof a=="number"){h=e.call(arguments,0);Ext.Array.insert(h,a,b)}}return g.apply(c||Ext.global,h)}},pass:function(c,a,b){if(!Ext.isArray(a)){if(Ext.isIterable(a)){a=Ext.Array.clone(a)}else{a=a!==undefined?[a]:[]}}return function(){var d=[].concat(a);d.push.apply(d,arguments);return c.apply(b||this,d)}},alias:function(b,a){return function(){return b[a].apply(b,arguments)}},clone:function(a){return function(){return a.apply(this,arguments)}},createInterceptor:function(d,c,b,a){var e=d;if(!Ext.isFunction(c)){return d}else{a=Ext.isDefined(a)?a:null;return function(){var h=this,g=arguments;c.target=h;c.method=d;return(c.apply(b||h||Ext.global,g)!==false)?d.apply(h||Ext.global,g):a}}},createDelayed:function(e,c,d,b,a){if(d||b){e=Ext.Function.bind(e,d,b,a)}return function(){var h=this,g=Array.prototype.slice.call(arguments);setTimeout(function(){e.apply(h,g)},c)}},defer:function(e,c,d,b,a){e=Ext.Function.bind(e,d,b,a);if(c>0){return setTimeout(Ext.supports.TimeoutActualLateness?function(){e()}:e,c)}e();return 0},createSequence:function(b,c,a){if(!c){return b}else{return function(){var d=b.apply(this,arguments);c.apply(a||this,arguments);return d}}},createBuffered:function(e,b,d,c){var a;return function(){var h=c||Array.prototype.slice.call(arguments,0),g=d||this;if(a){clearTimeout(a)}a=setTimeout(function(){e.apply(g,h)},b)}},createThrottled:function(e,b,d){var g,a,c,i,h=function(){e.apply(d||this,c);g=new Date().getTime()};return function(){a=new Date().getTime()-g;c=arguments;clearTimeout(i);if(!g||(a>=b)){h()}else{i=setTimeout(h,b-a)}}},interceptBefore:function(b,a,d,c){var e=b[a]||Ext.emptyFn;return(b[a]=function(){var g=d.apply(c||this,arguments);e.apply(this,arguments);return g})},interceptAfter:function(b,a,d,c){var e=b[a]||Ext.emptyFn;return(b[a]=function(){e.apply(this,arguments);return d.apply(c||this,arguments)})}};Ext.defer=Ext.Function.alias(Ext.Function,"defer");Ext.pass=Ext.Function.alias(Ext.Function,"pass");Ext.bind=Ext.Function.alias(Ext.Function,"bind");(function(){var a=function(){},b=Ext.Object={chain:Object.create||function(d){a.prototype=d;var c=new a();a.prototype=null;return c},toQueryObjects:function(e,k,d){var c=b.toQueryObjects,j=[],g,h;if(Ext.isArray(k)){for(g=0,h=k.length;g<h;g++){if(d){j=j.concat(c(e+"["+g+"]",k[g],true))}else{j.push({name:e,value:k[g]})}}}else{if(Ext.isObject(k)){for(g in k){if(k.hasOwnProperty(g)){if(d){j=j.concat(c(e+"["+g+"]",k[g],true))}else{j.push({name:e,value:k[g]})}}}}else{j.push({name:e,value:k})}}return j},toQueryString:function(g,d){var h=[],e=[],l,k,m,c,n;for(l in g){if(g.hasOwnProperty(l)){h=h.concat(b.toQueryObjects(l,g[l],d))}}for(k=0,m=h.length;k<m;k++){c=h[k];n=c.value;if(Ext.isEmpty(n)){n=""}else{if(Ext.isDate(n)){n=Ext.Date.toString(n)}}e.push(encodeURIComponent(c.name)+"="+encodeURIComponent(String(n)))}return e.join("&")},fromQueryString:function(d,r){var m=d.replace(/^\?/,"").split("&"),u={},s,k,w,n,q,g,o,p,c,h,t,l,v,e;for(q=0,g=m.length;q<g;q++){o=m[q];if(o.length>0){k=o.split("=");w=decodeURIComponent(k[0]);n=(k[1]!==undefined)?decodeURIComponent(k[1]):"";if(!r){if(u.hasOwnProperty(w)){if(!Ext.isArray(u[w])){u[w]=[u[w]]}u[w].push(n)}else{u[w]=n}}else{h=w.match(/(\[):?([^\]]*)\]/g);t=w.match(/^([^\[]+)/);w=t[0];l=[];if(h===null){u[w]=n;continue}for(p=0,c=h.length;p<c;p++){v=h[p];v=(v.length===2)?"":v.substring(1,v.length-1);l.push(v)}l.unshift(w);s=u;for(p=0,c=l.length;p<c;p++){v=l[p];if(p===c-1){if(Ext.isArray(s)&&v===""){s.push(n)}else{s[v]=n}}else{if(s[v]===undefined||typeof s[v]==="string"){e=l[p+1];s[v]=(Ext.isNumeric(e)||e==="")?[]:{}}s=s[v]}}}}}return u},each:function(c,e,d){for(var g in c){if(c.hasOwnProperty(g)){if(e.call(d||c,g,c[g],c)===false){return}}}},merge:function(k){var h=1,j=arguments.length,c=b.merge,e=Ext.clone,g,m,l,d;for(;h<j;h++){g=arguments[h];for(m in g){l=g[m];if(l&&l.constructor===Object){d=k[m];if(d&&d.constructor===Object){c(d,l)}else{k[m]=e(l)}}else{k[m]=l}}}return k},mergeIf:function(c){var h=1,j=arguments.length,e=Ext.clone,d,g,k;for(;h<j;h++){d=arguments[h];for(g in d){if(!(g in c)){k=d[g];if(k&&k.constructor===Object){c[g]=e(k)}else{c[g]=k}}}}return c},getKey:function(c,e){for(var d in c){if(c.hasOwnProperty(d)&&c[d]===e){return d}}return null},getValues:function(d){var c=[],e;for(e in d){if(d.hasOwnProperty(e)){c.push(d[e])}}return c},getKeys:(typeof Object.keys=="function")?function(c){if(!c){return[]}return Object.keys(c)}:function(c){var d=[],e;for(e in c){if(c.hasOwnProperty(e)){d.push(e)}}return d},getSize:function(c){var d=0,e;for(e in c){if(c.hasOwnProperty(e)){d++}}return d},isEmpty:function(c){for(var d in c){if(c.hasOwnProperty(d)){return false}}return true},equals:(function(){var c=function(g,e){var d;for(d in g){if(g.hasOwnProperty(d)){if(g[d]!==e[d]){return false}}}return true};return function(e,d){if(e===d){return true}if(e&&d){return c(e,d)&&c(d,e)}else{if(!e&&!d){return e===d}else{return false}}}})(),classify:function(g){var e=g,i=[],d={},c=function(){var k=0,l=i.length,m;for(;k<l;k++){m=i[k];this[m]=new d[m]()}},h,j;for(h in g){if(g.hasOwnProperty(h)){j=g[h];if(j&&j.constructor===Object){i.push(h);d[h]=b.classify(j)}}}c.prototype=e;return c}};Ext.merge=Ext.Object.merge;Ext.mergeIf=Ext.Object.mergeIf;Ext.urlEncode=function(){var c=Ext.Array.from(arguments),d="";if((typeof c[1]==="string")){d=c[1]+"&";c[1]=false}return d+b.toQueryString.apply(b,c)};Ext.urlDecode=function(){return b.fromQueryString.apply(b,arguments)}}());Ext.Date=new function(){var d=this,j=/(\\.)/g,a=/([gGhHisucUOPZ]|MS)/,e=/([djzmnYycU]|MS)/,i=/\\/gi,c=/\{(\d+)\}/g,g=new RegExp("\\/Date\\(([-+])?(\\d+)(?:[+-]\\d{4})?\\)\\/"),b=["var me = this, dt, y, m, d, h, i, s, ms, o, O, z, zz, u, v, W, year, jan4, week1monday,","def = me.defaults,","from = Ext.Number.from,","results = String(input).match(me.parseRegexes[{0}]);","if(results){","{1}","if(u != null){","v = new Date(u * 1000);","}else{","dt = me.clearTime(new Date);","y = from(y, from(def.y, dt.getFullYear()));","m = from(m, from(def.m - 1, dt.getMonth()));","d = from(d, from(def.d, dt.getDate()));","h  = from(h, from(def.h, dt.getHours()));","i  = from(i, from(def.i, dt.getMinutes()));","s  = from(s, from(def.s, dt.getSeconds()));","ms = from(ms, from(def.ms, dt.getMilliseconds()));","if(z >= 0 && y >= 0){","v = me.add(new Date(y < 100 ? 100 : y, 0, 1, h, i, s, ms), me.YEAR, y < 100 ? y - 100 : 0);","v = !strict? v : (strict === true && (z <= 364 || (me.isLeapYear(v) && z <= 365))? me.add(v, me.DAY, z) : null);","}else if(strict === true && !me.isValid(y, m + 1, d, h, i, s, ms)){","v = null;","}else{","if (W) {","year = y || (new Date()).getFullYear(),","jan4 = new Date(year, 0, 4, 0, 0, 0),","week1monday = new Date(jan4.getTime() - ((jan4.getDay() - 1) * 86400000));","v = Ext.Date.clearTime(new Date(week1monday.getTime() + ((W - 1) * 604800000)));","} else {","v = me.add(new Date(y < 100 ? 100 : y, m, d, h, i, s, ms), me.YEAR, y < 100 ? y - 100 : 0);","}","}","}","}","if(v){","if(zz != null){","v = me.add(v, me.SECOND, -v.getTimezoneOffset() * 60 - zz);","}else if(o){","v = me.add(v, me.MINUTE, -v.getTimezoneOffset() + (sn == '+'? -1 : 1) * (hr * 60 + mn));","}","}","return v;"].join("\n");function h(l){var k=Array.prototype.slice.call(arguments,1);return l.replace(c,function(n,o){return k[o]})}Ext.apply(d,{now:Date.now||function(){return +new Date()},toString:function(k){var l=Ext.String.leftPad;return k.getFullYear()+"-"+l(k.getMonth()+1,2,"0")+"-"+l(k.getDate(),2,"0")+"T"+l(k.getHours(),2,"0")+":"+l(k.getMinutes(),2,"0")+":"+l(k.getSeconds(),2,"0")},getElapsed:function(l,k){return Math.abs(l-(k||new Date()))},useStrict:false,formatCodeToRegex:function(l,k){var m=d.parseCodes[l];if(m){m=typeof m=="function"?m():m;d.parseCodes[l]=m}return m?Ext.applyIf({c:m.c?h(m.c,k||"{0}"):m.c},m):{g:0,c:null,s:Ext.String.escapeRegex(l)}},parseFunctions:{MS:function(l,k){var m=(l||"").match(g);return m?new Date(((m[1]||"")+m[2])*1):null},time:function(l,k){var m=parseInt(l,10);if(m||m===0){return new Date(m)}return null},timestamp:function(l,k){var m=parseInt(l,10);if(m||m===0){return new Date(m*1000)}return null}},parseRegexes:[],formatFunctions:{MS:function(){return"\\/Date("+this.getTime()+")\\/"},time:function(){return this.getTime().toString()},timestamp:function(){return d.format(this,"U")}},y2kYear:50,MILLI:"ms",SECOND:"s",MINUTE:"mi",HOUR:"h",DAY:"d",MONTH:"mo",YEAR:"y",defaults:{},dayNames:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],monthNames:["January","February","March","April","May","June","July","August","September","October","November","December"],monthNumbers:{January:0,Jan:0,February:1,Feb:1,March:2,Mar:2,April:3,Apr:3,May:4,June:5,Jun:5,July:6,Jul:6,August:7,Aug:7,September:8,Sep:8,October:9,Oct:9,November:10,Nov:10,December:11,Dec:11},defaultFormat:"m/d/Y",getShortMonthName:function(k){return Ext.Date.monthNames[k].substring(0,3)},getShortDayName:function(k){return Ext.Date.dayNames[k].substring(0,3)},getMonthNumber:function(k){return Ext.Date.monthNumbers[k.substring(0,1).toUpperCase()+k.substring(1,3).toLowerCase()]},formatContainsHourInfo:function(k){return a.test(k.replace(j,""))},formatContainsDateInfo:function(k){return e.test(k.replace(j,""))},unescapeFormat:function(k){return k.replace(i,"")},formatCodes:{d:"Ext.String.leftPad(this.getDate(), 2, '0')",D:"Ext.Date.getShortDayName(this.getDay())",j:"this.getDate()",l:"Ext.Date.dayNames[this.getDay()]",N:"(this.getDay() ? this.getDay() : 7)",S:"Ext.Date.getSuffix(this)",w:"this.getDay()",z:"Ext.Date.getDayOfYear(this)",W:"Ext.String.leftPad(Ext.Date.getWeekOfYear(this), 2, '0')",F:"Ext.Date.monthNames[this.getMonth()]",m:"Ext.String.leftPad(this.getMonth() + 1, 2, '0')",M:"Ext.Date.getShortMonthName(this.getMonth())",n:"(this.getMonth() + 1)",t:"Ext.Date.getDaysInMonth(this)",L:"(Ext.Date.isLeapYear(this) ? 1 : 0)",o:"(this.getFullYear() + (Ext.Date.getWeekOfYear(this) == 1 && this.getMonth() > 0 ? +1 : (Ext.Date.getWeekOfYear(this) >= 52 && this.getMonth() < 11 ? -1 : 0)))",Y:"Ext.String.leftPad(this.getFullYear(), 4, '0')",y:"('' + this.getFullYear()).substring(2, 4)",a:"(this.getHours() < 12 ? 'am' : 'pm')",A:"(this.getHours() < 12 ? 'AM' : 'PM')",g:"((this.getHours() % 12) ? this.getHours() % 12 : 12)",G:"this.getHours()",h:"Ext.String.leftPad((this.getHours() % 12) ? this.getHours() % 12 : 12, 2, '0')",H:"Ext.String.leftPad(this.getHours(), 2, '0')",i:"Ext.String.leftPad(this.getMinutes(), 2, '0')",s:"Ext.String.leftPad(this.getSeconds(), 2, '0')",u:"Ext.String.leftPad(this.getMilliseconds(), 3, '0')",O:"Ext.Date.getGMTOffset(this)",P:"Ext.Date.getGMTOffset(this, true)",T:"Ext.Date.getTimezone(this)",Z:"(this.getTimezoneOffset() * -60)",c:function(){var p,n,m,k,o;for(p="Y-m-dTH:i:sP",n=[],m=0,k=p.length;m<k;++m){o=p.charAt(m);n.push(o=="T"?"'T'":d.getFormatCode(o))}return n.join(" + ")},U:"Math.round(this.getTime() / 1000)"},isValid:function(t,k,r,p,n,o,l){p=p||0;n=n||0;o=o||0;l=l||0;var q=d.add(new Date(t<100?100:t,k-1,r,p,n,o,l),d.YEAR,t<100?t-100:0);return t==q.getFullYear()&&k==q.getMonth()+1&&r==q.getDate()&&p==q.getHours()&&n==q.getMinutes()&&o==q.getSeconds()&&l==q.getMilliseconds()},parse:function(l,n,k){var m=d.parseFunctions;if(m[n]==null){d.createParser(n)}return m[n].call(d,l,Ext.isDefined(k)?k:d.useStrict)},parseDate:function(l,m,k){return d.parse(l,m,k)},getFormatCode:function(l){var k=d.formatCodes[l];if(k){k=typeof k=="function"?k():k;d.formatCodes[l]=k}return k||("'"+Ext.String.escape(l)+"'")},createFormat:function(o){var n=[],k=false,m="",l;for(l=0;l<o.length;++l){m=o.charAt(l);if(!k&&m=="\\"){k=true}else{if(k){k=false;n.push("'"+Ext.String.escape(m)+"'")}else{n.push(d.getFormatCode(m))}}}d.formatFunctions[o]=Ext.functionFactory("return "+n.join("+"))},createParser:function(t){var l=d.parseRegexes.length,u=1,m=[],s=[],q=false,k="",o=0,p=t.length,r=[],n;for(;o<p;++o){k=t.charAt(o);if(!q&&k=="\\"){q=true}else{if(q){q=false;s.push(Ext.String.escape(k))}else{n=d.formatCodeToRegex(k,u);u+=n.g;s.push(n.s);if(n.g&&n.c){if(n.calcAtEnd){r.push(n.c)}else{m.push(n.c)}}}}}m=m.concat(r);d.parseRegexes[l]=new RegExp("^"+s.join("")+"$","i");d.parseFunctions[t]=Ext.functionFactory("input","strict",h(b,l,m.join("")))},parseCodes:{d:{g:1,c:"d = parseInt(results[{0}], 10);\n",s:"(3[0-1]|[1-2][0-9]|0[1-9])"},j:{g:1,c:"d = parseInt(results[{0}], 10);\n",s:"(3[0-1]|[1-2][0-9]|[1-9])"},D:function(){for(var k=[],l=0;l<7;k.push(d.getShortDayName(l)),++l){}return{g:0,c:null,s:"(?:"+k.join("|")+")"}},l:function(){return{g:0,c:null,s:"(?:"+d.dayNames.join("|")+")"}},N:{g:0,c:null,s:"[1-7]"},S:{g:0,c:null,s:"(?:st|nd|rd|th)"},w:{g:0,c:null,s:"[0-6]"},z:{g:1,c:"z = parseInt(results[{0}], 10);\n",s:"(\\d{1,3})"},W:{g:1,c:"W = parseInt(results[{0}], 10);\n",s:"(\\d{2})"},F:function(){return{g:1,c:"m = parseInt(me.getMonthNumber(results[{0}]), 10);\n",s:"("+d.monthNames.join("|")+")"}},M:function(){for(var k=[],l=0;l<12;k.push(d.getShortMonthName(l)),++l){}return Ext.applyIf({s:"("+k.join("|")+")"},d.formatCodeToRegex("F"))},m:{g:1,c:"m = parseInt(results[{0}], 10) - 1;\n",s:"(1[0-2]|0[1-9])"},n:{g:1,c:"m = parseInt(results[{0}], 10) - 1;\n",s:"(1[0-2]|[1-9])"},t:{g:0,c:null,s:"(?:\\d{2})"},L:{g:0,c:null,s:"(?:1|0)"},o:{g:1,c:"y = parseInt(results[{0}], 10);\n",s:"(\\d{4})"},Y:{g:1,c:"y = parseInt(results[{0}], 10);\n",s:"(\\d{4})"},y:{g:1,c:"var ty = parseInt(results[{0}], 10);\ny = ty > me.y2kYear ? 1900 + ty : 2000 + ty;\n",s:"(\\d{1,2})"},a:{g:1,c:"if (/(am)/i.test(results[{0}])) {\nif (!h || h == 12) { h = 0; }\n} else { if (!h || h < 12) { h = (h || 0) + 12; }}",s:"(am|pm|AM|PM)",calcAtEnd:true},A:{g:1,c:"if (/(am)/i.test(results[{0}])) {\nif (!h || h == 12) { h = 0; }\n} else { if (!h || h < 12) { h = (h || 0) + 12; }}",s:"(AM|PM|am|pm)",calcAtEnd:true},g:{g:1,c:"h = parseInt(results[{0}], 10);\n",s:"(1[0-2]|[0-9])"},G:{g:1,c:"h = parseInt(results[{0}], 10);\n",s:"(2[0-3]|1[0-9]|[0-9])"},h:{g:1,c:"h = parseInt(results[{0}], 10);\n",s:"(1[0-2]|0[1-9])"},H:{g:1,c:"h = parseInt(results[{0}], 10);\n",s:"(2[0-3]|[0-1][0-9])"},i:{g:1,c:"i = parseInt(results[{0}], 10);\n",s:"([0-5][0-9])"},s:{g:1,c:"s = parseInt(results[{0}], 10);\n",s:"([0-5][0-9])"},u:{g:1,c:"ms = results[{0}]; ms = parseInt(ms, 10)/Math.pow(10, ms.length - 3);\n",s:"(\\d+)"},O:{g:1,c:["o = results[{0}];","var sn = o.substring(0,1),","hr = o.substring(1,3)*1 + Math.floor(o.substring(3,5) / 60),","mn = o.substring(3,5) % 60;","o = ((-12 <= (hr*60 + mn)/60) && ((hr*60 + mn)/60 <= 14))? (sn + Ext.String.leftPad(hr, 2, '0') + Ext.String.leftPad(mn, 2, '0')) : null;\n"].join("\n"),s:"([+-]\\d{4})"},P:{g:1,c:["o = results[{0}];","var sn = o.substring(0,1),","hr = o.substring(1,3)*1 + Math.floor(o.substring(4,6) / 60),","mn = o.substring(4,6) % 60;","o = ((-12 <= (hr*60 + mn)/60) && ((hr*60 + mn)/60 <= 14))? (sn + Ext.String.leftPad(hr, 2, '0') + Ext.String.leftPad(mn, 2, '0')) : null;\n"].join("\n"),s:"([+-]\\d{2}:\\d{2})"},T:{g:0,c:null,s:"[A-Z]{1,5}"},Z:{g:1,c:"zz = results[{0}] * 1;\nzz = (-43200 <= zz && zz <= 50400)? zz : null;\n",s:"([+-]?\\d{1,5})"},c:function(){var n=[],k=[d.formatCodeToRegex("Y",1),d.formatCodeToRegex("m",2),d.formatCodeToRegex("d",3),d.formatCodeToRegex("H",4),d.formatCodeToRegex("i",5),d.formatCodeToRegex("s",6),{c:"ms = results[7] || '0'; ms = parseInt(ms, 10)/Math.pow(10, ms.length - 3);\n"},{c:["if(results[8]) {","if(results[8] == 'Z'){","zz = 0;","}else if (results[8].indexOf(':') > -1){",d.formatCodeToRegex("P",8).c,"}else{",d.formatCodeToRegex("O",8).c,"}","}"].join("\n")}],o,m;for(o=0,m=k.length;o<m;++o){n.push(k[o].c)}return{g:1,c:n.join(""),s:[k[0].s,"(?:","-",k[1].s,"(?:","-",k[2].s,"(?:","(?:T| )?",k[3].s,":",k[4].s,"(?::",k[5].s,")?","(?:(?:\\.|,)(\\d+))?","(Z|(?:[-+]\\d{2}(?::)?\\d{2}))?",")?",")?",")?"].join("")}},U:{g:1,c:"u = parseInt(results[{0}], 10);\n",s:"(-?\\d+)"}},dateFormat:function(k,l){return d.format(k,l)},isEqual:function(l,k){if(l&&k){return(l.getTime()===k.getTime())}return !(l||k)},format:function(l,m){var k=d.formatFunctions;if(!Ext.isDate(l)){return""}if(k[m]==null){d.createFormat(m)}return k[m].call(l)+""},getTimezone:function(k){return k.toString().replace(/^.* (?:\((.*)\)|([A-Z]{1,5})(?:[\-+][0-9]{4})?(?: -?\d+)?)$/,"$1$2").replace(/[^A-Z]/g,"")},getGMTOffset:function(k,l){var m=k.getTimezoneOffset();return(m>0?"-":"+")+Ext.String.leftPad(Math.floor(Math.abs(m)/60),2,"0")+(l?":":"")+Ext.String.leftPad(Math.abs(m%60),2,"0")},getDayOfYear:function(n){var l=0,p=Ext.Date.clone(n),k=n.getMonth(),o;for(o=0,p.setDate(1),p.setMonth(0);o<k;p.setMonth(++o)){l+=d.getDaysInMonth(p)}return l+n.getDate()-1},getWeekOfYear:(function(){var k=86400000,l=7*k;return function(n){var o=Date.UTC(n.getFullYear(),n.getMonth(),n.getDate()+3)/k,m=Math.floor(o/7),p=new Date(m*l).getUTCFullYear();return m-Math.floor(Date.UTC(p,0,7)/l)+1}}()),isLeapYear:function(k){var l=k.getFullYear();return !!((l&3)==0&&(l%100||(l%400==0&&l)))},getFirstDayOfMonth:function(l){var k=(l.getDay()-(l.getDate()-1))%7;return(k<0)?(k+7):k},getLastDayOfMonth:function(k){return d.getLastDateOfMonth(k).getDay()},getFirstDateOfMonth:function(k){return new Date(k.getFullYear(),k.getMonth(),1)},getLastDateOfMonth:function(k){return new Date(k.getFullYear(),k.getMonth(),d.getDaysInMonth(k))},getDaysInMonth:(function(){var k=[31,28,31,30,31,30,31,31,30,31,30,31];return function(n){var l=n.getMonth();return l==1&&d.isLeapYear(n)?29:k[l]}}()),getSuffix:function(k){switch(k.getDate()){case 1:case 21:case 31:return"st";case 2:case 22:return"nd";case 3:case 23:return"rd";default:return"th"}},clone:function(k){return new Date(k.getTime())},isDST:function(k){return new Date(k.getFullYear(),0,1).getTimezoneOffset()!=k.getTimezoneOffset()},clearTime:function(k,o){if(o){return Ext.Date.clearTime(Ext.Date.clone(k))}var m=k.getDate(),l,n;k.setHours(0);k.setMinutes(0);k.setSeconds(0);k.setMilliseconds(0);if(k.getDate()!=m){for(l=1,n=d.add(k,Ext.Date.HOUR,l);n.getDate()!=m;l++,n=d.add(k,Ext.Date.HOUR,l)){}k.setDate(m);k.setHours(n.getHours())}return k},add:function(n,m,q){var r=Ext.Date.clone(n),k=Ext.Date,l,p,o=0;if(!m||q===0){return r}p=q-parseInt(q,10);q=parseInt(q,10);if(q){switch(m.toLowerCase()){case Ext.Date.MILLI:r.setTime(r.getTime()+q);break;case Ext.Date.SECOND:r.setTime(r.getTime()+q*1000);break;case Ext.Date.MINUTE:r.setTime(r.getTime()+q*60*1000);break;case Ext.Date.HOUR:r.setTime(r.getTime()+q*60*60*1000);break;case Ext.Date.DAY:r.setDate(r.getDate()+q);break;case Ext.Date.MONTH:l=n.getDate();if(l>28){l=Math.min(l,Ext.Date.getLastDateOfMonth(Ext.Date.add(Ext.Date.getFirstDateOfMonth(n),Ext.Date.MONTH,q)).getDate())}r.setDate(l);r.setMonth(n.getMonth()+q);break;case Ext.Date.YEAR:l=n.getDate();if(l>28){l=Math.min(l,Ext.Date.getLastDateOfMonth(Ext.Date.add(Ext.Date.getFirstDateOfMonth(n),Ext.Date.YEAR,q)).getDate())}r.setDate(l);r.setFullYear(n.getFullYear()+q);break}}if(p){switch(m.toLowerCase()){case Ext.Date.MILLI:o=1;break;case Ext.Date.SECOND:o=1000;break;case Ext.Date.MINUTE:o=1000*60;break;case Ext.Date.HOUR:o=1000*60*60;break;case Ext.Date.DAY:o=1000*60*60*24;break;case Ext.Date.MONTH:l=d.getDaysInMonth(r);o=1000*60*60*24*l;break;case Ext.Date.YEAR:l=(d.isLeapYear(r)?366:365);o=1000*60*60*24*l;break}if(o){r.setTime(r.getTime()+o*p)}}return r},subtract:function(l,k,m){return d.add(l,k,-m)},between:function(l,n,k){var m=l.getTime();return n.getTime()<=m&&m<=k.getTime()},compat:function(){var l=window.Date,k,r=["useStrict","formatCodeToRegex","parseFunctions","parseRegexes","formatFunctions","y2kYear","MILLI","SECOND","MINUTE","HOUR","DAY","MONTH","YEAR","defaults","dayNames","monthNames","monthNumbers","getShortMonthName","getShortDayName","getMonthNumber","formatCodes","isValid","parseDate","getFormatCode","createFormat","createParser","parseCodes"],o=["dateFormat","format","getTimezone","getGMTOffset","getDayOfYear","getWeekOfYear","isLeapYear","getFirstDayOfMonth","getLastDayOfMonth","getDaysInMonth","getSuffix","clone","isDST","clearTime","add","between"],q=r.length,m=o.length,n,t,u;for(u=0;u<q;u++){n=r[u];l[n]=d[n]}for(k=0;k<m;k++){t=o[k];l.prototype[t]=function(){var p=Array.prototype.slice.call(arguments);p.unshift(this);return d[t].apply(d,p)}}}})};(function(a){var d=[],b=function(){},c=function(j,g,i,h){var e=function(){var k=this.callParent(arguments);j.apply(this,arguments);return k};e.$name=i;e.$owner=h;if(g){e.$previous=g.$previous;g.$previous=e}return e};Ext.apply(b,{$className:"Ext.Base",$isClass:true,create:function(){return Ext.create.apply(Ext,[this].concat(Array.prototype.slice.call(arguments,0)))},extend:function(k){var e=k.prototype,n,h,j,l,g,m;h=this.prototype=Ext.Object.chain(e);h.self=this;this.superclass=h.superclass=e;if(!k.$isClass){n=Ext.Base.prototype;for(j in n){if(j in h){h[j]=n[j]}}}m=e.$inheritableStatics;if(m){for(j=0,l=m.length;j<l;j++){g=m[j];if(!this.hasOwnProperty(g)){this[g]=k[g]}}}if(k.$onExtended){this.$onExtended=k.$onExtended.slice()}h.config=new h.configClass();h.initConfigList=h.initConfigList.slice();h.initConfigMap=Ext.clone(h.initConfigMap);h.configMap=Ext.Object.chain(h.configMap)},$onExtended:[],triggerExtended:function(){var h=this.$onExtended,g=h.length,e,j;if(g>0){for(e=0;e<g;e++){j=h[e];j.fn.apply(j.scope||this,arguments)}}},onExtended:function(g,e){this.$onExtended.push({fn:g,scope:e});return this},addConfig:function(i,m){var o=this.prototype,n=Ext.Class.configNameCache,j=o.configMap,k=o.initConfigList,h=o.initConfigMap,l=o.config,e,g,p;for(g in i){if(i.hasOwnProperty(g)){if(!j[g]){j[g]=true}p=i[g];e=n[g].initialized;if(!h[g]&&p!==null&&!o[e]){h[g]=true;k.push(g)}}}if(m){Ext.merge(l,i)}else{Ext.mergeIf(l,i)}o.configClass=Ext.Object.classify(l)},addStatics:function(e){var h,g;for(g in e){if(e.hasOwnProperty(g)){h=e[g];if(typeof h=="function"&&!h.$isClass&&h!==Ext.emptyFn&&h!==Ext.identityFn){h.$owner=this;h.$name=g}this[g]=h}}return this},addInheritableStatics:function(g){var j,e,i=this.prototype,h,k;j=i.$inheritableStatics;e=i.$hasInheritableStatics;if(!j){j=i.$inheritableStatics=[];e=i.$hasInheritableStatics={}}for(h in g){if(g.hasOwnProperty(h)){k=g[h];this[h]=k;if(!e[h]){e[h]=true;j.push(h)}}}return this},addMembers:function(g){var j=this.prototype,e=Ext.enumerables,m=[],k,l,h,n;for(h in g){m.push(h)}if(e){m.push.apply(m,e)}for(k=0,l=m.length;k<l;k++){h=m[k];if(g.hasOwnProperty(h)){n=g[h];if(typeof n=="function"&&!n.$isClass&&n!==Ext.emptyFn&&n!==Ext.identityFn){n.$owner=this;n.$name=h}j[h]=n}}return this},addMember:function(e,g){if(typeof g=="function"&&!g.$isClass&&g!==Ext.emptyFn&&g!==Ext.identityFn){g.$owner=this;g.$name=e}this.prototype[e]=g;return this},implement:function(){this.addMembers.apply(this,arguments)},borrow:function(k,h){var o=this.prototype,n=k.prototype,j,l,g,m,e;h=Ext.Array.from(h);for(j=0,l=h.length;j<l;j++){g=h[j];e=n[g];if(typeof e=="function"){m=Ext.Function.clone(e);m.$owner=this;m.$name=g;o[g]=m}else{o[g]=e}}return this},override:function(g){var n=this,p=Ext.enumerables,l=n.prototype,i=Ext.Function.clone,e,k,h,o,m,j;if(arguments.length===2){e=g;g={};g[e]=arguments[1];p=null}do{m=[];o=null;for(e in g){if(e=="statics"){o=g[e]}else{if(e=="inheritableStatics"){n.addInheritableStatics(g[e])}else{if(e=="config"){n.addConfig(g[e],true)}else{m.push(e)}}}}if(p){m.push.apply(m,p)}for(k=m.length;k--;){e=m[k];if(g.hasOwnProperty(e)){h=g[e];if(typeof h=="function"&&!h.$className&&h!==Ext.emptyFn&&h!==Ext.identityFn){if(typeof h.$owner!="undefined"){h=i(h)}h.$owner=n;h.$name=e;j=l[e];if(j){h.$previous=j}}l[e]=h}}l=n;g=o}while(g);return this},callParent:function(e){var g;return(g=this.callParent.caller)&&(g.$previous||((g=g.$owner?g:g.caller)&&g.$owner.superclass.self[g.$name])).apply(this,e||d)},callSuper:function(e){var g;return(g=this.callSuper.caller)&&((g=g.$owner?g:g.caller)&&g.$owner.superclass.self[g.$name]).apply(this,e||d)},mixin:function(g,h){var l=this,s=h.prototype,n=l.prototype,r,m,j,k,q,p,o,e;if(typeof s.onClassMixedIn!="undefined"){s.onClassMixedIn.call(h,l)}if(!n.hasOwnProperty("mixins")){if("mixins" in n){n.mixins=Ext.Object.chain(n.mixins)}else{n.mixins={}}}for(r in s){p=s[r];if(r==="mixins"){Ext.merge(n.mixins,p)}else{if(r==="xhooks"){for(o in p){e=p[o];e.$previous=Ext.emptyFn;if(n.hasOwnProperty(o)){c(e,n[o],o,l)}else{n[o]=c(e,null,o,l)}}}else{if(!(r==="mixinId"||r==="config")&&(n[r]===undefined)){n[r]=p}}}}m=s.$inheritableStatics;if(m){for(j=0,k=m.length;j<k;j++){q=m[j];if(!l.hasOwnProperty(q)){l[q]=h[q]}}}if("config" in s){l.addConfig(s.config,false)}n.mixins[g]=s;return l},getName:function(){return Ext.getClassName(this)},createAlias:a(function(g,e){this.override(g,function(){return this[e].apply(this,arguments)})}),addXtype:function(j){var g=this.prototype,i=g.xtypesMap,h=g.xtypes,e=g.xtypesChain;if(!g.hasOwnProperty("xtypesMap")){i=g.xtypesMap=Ext.merge({},g.xtypesMap||{});h=g.xtypes=g.xtypes?[].concat(g.xtypes):[];e=g.xtypesChain=g.xtypesChain?[].concat(g.xtypesChain):[];g.xtype=j}if(!i[j]){i[j]=true;h.push(j);e.push(j);Ext.ClassManager.setAlias(this,"widget."+j)}return this}});b.implement({isInstance:true,$className:"Ext.Base",configClass:Ext.emptyFn,initConfigList:[],configMap:{},initConfigMap:{},statics:function(){var g=this.statics.caller,e=this.self;if(!g){return e}return g.$owner},callParent:function(g){var h,e=(h=this.callParent.caller)&&(h.$previous||((h=h.$owner?h:h.caller)&&h.$owner.superclass[h.$name]));return e.apply(this,g||d)},callSuper:function(g){var h,e=(h=this.callSuper.caller)&&((h=h.$owner?h:h.caller)&&h.$owner.superclass[h.$name]);return e.apply(this,g||d)},self:b,constructor:function(){return this},initConfig:function(h){var n=h,m=Ext.Class.configNameCache,k=new this.configClass(),q=this.initConfigList,j=this.configMap,p,l,o,g,e;this.initConfig=Ext.emptyFn;this.initialConfig=n||{};this.config=h=(n)?Ext.merge(k,h):k;if(n){q=q.slice();for(g in n){if(j[g]){if(n[g]!==null){q.push(g);this[m[g].initialized]=false}}}}for(l=0,o=q.length;l<o;l++){g=q[l];p=m[g];e=p.initialized;if(!this[e]){this[e]=true;this[p.set].call(this,h[g])}}return this},hasConfig:function(e){return Boolean(this.configMap[e])},setConfig:function(i,m){if(!i){return this}var h=Ext.Class.configNameCache,e=this.config,l=this.configMap,k=this.initialConfig,g,j;m=Boolean(m);for(g in i){if(m&&k.hasOwnProperty(g)){continue}j=i[g];e[g]=j;if(l[g]){this[h[g].set](j)}}return this},getConfig:function(g){var e=Ext.Class.configNameCache;return this[e[g].get]()},getInitialConfig:function(g){var e=this.config;if(!g){return e}else{return e[g]}},onConfigUpdate:function(l,n,o){var p=this.self,h,k,e,j,m,g;l=Ext.Array.from(l);o=o||this;for(h=0,k=l.length;h<k;h++){e=l[h];j="update"+Ext.String.capitalize(e);m=this[j]||Ext.emptyFn;g=function(){m.apply(this,arguments);o[n].apply(o,arguments)};g.$name=j;g.$owner=p;this[j]=g}},destroy:function(){this.destroy=Ext.emptyFn}});b.prototype.callOverridden=b.prototype.callParent;Ext.Base=b}(Ext.Function.flexSetter));(function(){var c,b=Ext.Base,g=[],e,d;for(e in b){if(b.hasOwnProperty(e)){g.push(e)}}d=g.length;function a(i){function h(){return this.constructor.apply(this,arguments)||null}return h}Ext.Class=c=function(i,j,h){if(typeof i!="function"){h=j;j=i;i=null}if(!j){j={}}i=c.create(i,j);c.process(i,j,h);return i};Ext.apply(c,{onBeforeCreated:function(i,j,h){i.addMembers(j);h.onCreated.call(i,i)},create:function(h,l){var j,k;if(!h){h=a()}for(k=0;k<d;k++){j=g[k];h[j]=b[j]}return h},process:function(h,p,l){var k=p.preprocessors||c.defaultPreprocessors,s=this.preprocessors,v={onBeforeCreated:this.onBeforeCreated},u=[],w,o,n,t,m,r,q;delete p.preprocessors;for(n=0,t=k.length;n<t;n++){w=k[n];if(typeof w=="string"){w=s[w];o=w.properties;if(o===true){u.push(w.fn)}else{if(o){for(m=0,r=o.length;m<r;m++){q=o[m];if(p.hasOwnProperty(q)){u.push(w.fn);break}}}}}else{u.push(w)}}v.onCreated=l?l:Ext.emptyFn;v.preprocessors=u;this.doProcess(h,p,v)},doProcess:function(i,m,h){var l=this,n=h.preprocessors,j=n.shift(),k=l.doProcess;for(;j;j=n.shift()){if(j.call(l,i,m,h,k)===false){return}}h.onBeforeCreated.apply(l,arguments)},preprocessors:{},registerPreprocessor:function(i,l,j,h,k){if(!h){h="last"}if(!j){j=[i]}this.preprocessors[i]={name:i,properties:j||false,fn:l};this.setDefaultPreprocessorPosition(i,h,k);return this},getPreprocessor:function(h){return this.preprocessors[h]},getPreprocessors:function(){return this.preprocessors},defaultPreprocessors:[],getDefaultPreprocessors:function(){return this.defaultPreprocessors},setDefaultPreprocessors:function(h){this.defaultPreprocessors=Ext.Array.from(h);return this},setDefaultPreprocessorPosition:function(j,l,k){var h=this.defaultPreprocessors,i;if(typeof l=="string"){if(l==="first"){h.unshift(j);return this}else{if(l==="last"){h.push(j);return this}}l=(l==="after")?1:-1}i=Ext.Array.indexOf(h,k);if(i!==-1){Ext.Array.splice(h,Math.max(0,i+l),0,j)}return this},configNameCache:{},getConfigNameMap:function(j){var i=this.configNameCache,k=i[j],h;if(!k){h=j.charAt(0).toUpperCase()+j.substr(1);k=i[j]={internal:j,initialized:"_is"+h+"Initialized",apply:"apply"+h,update:"update"+h,set:"set"+h,get:"get"+h,doSet:"doSet"+h,changeEvent:j.toLowerCase()+"change"}}return k}});c.registerPreprocessor("extend",function(j,l,q){var m=Ext.Base,n=m.prototype,o=l.extend,h,p,k;delete l.extend;if(o&&o!==Object){h=o}else{h=m}p=h.prototype;if(!h.$isClass){for(k in n){if(!p[k]){p[k]=n[k]}}}j.extend(h);j.triggerExtended.apply(j,arguments);if(l.onClassExtended){j.onExtended(l.onClassExtended,j);delete l.onClassExtended}},true);c.registerPreprocessor("statics",function(h,i){h.addStatics(i.statics);delete i.statics});c.registerPreprocessor("inheritableStatics",function(h,i){h.addInheritableStatics(i.inheritableStatics);delete i.inheritableStatics});c.registerPreprocessor("config",function(h,k){var j=k.config,i=h.prototype;delete k.config;Ext.Object.each(j,function(n,w){var u=c.getConfigNameMap(n),q=u.internal,l=u.initialized,v=u.apply,o=u.update,t=u.set,m=u.get,y=(t in i)||k.hasOwnProperty(t),p=(v in i)||k.hasOwnProperty(v),r=(o in i)||k.hasOwnProperty(o),x,s;if(w===null||(!y&&!p&&!r)){i[q]=w;i[l]=true}else{i[l]=false}if(!y){k[t]=function(B){var A=this[q],z=this[v],C=this[o];if(!this[l]){this[l]=true}if(z){B=z.call(this,B,A)}if(typeof B!="undefined"){this[q]=B;if(C&&B!==A){C.call(this,B,A)}}return this}}if(!(m in i)||k.hasOwnProperty(m)){s=k[m]||false;if(s){x=function(){return s.apply(this,arguments)}}else{x=function(){return this[q]}}k[m]=function(){var z;if(!this[l]){this[l]=true;this[t](this.config[n])}z=this[m];if("$previous" in z){z.$previous=x}else{this[m]=x}return x.apply(this,arguments)}}});h.addConfig(j,true)});c.registerPreprocessor("mixins",function(l,p,h){var j=p.mixins,m,k,n,o;delete p.mixins;Ext.Function.interceptBefore(h,"onCreated",function(){if(j instanceof Array){for(n=0,o=j.length;n<o;n++){k=j[n];m=k.prototype.mixinId||k.$className;l.mixin(m,k)}}else{for(var i in j){if(j.hasOwnProperty(i)){l.mixin(i,j[i])}}}})});Ext.extend=function(j,k,i){if(arguments.length===2&&Ext.isObject(k)){i=k;k=j;j=null}var h;if(!k){throw new Error("[Ext.extend] Attempting to extend from a class which has not been loaded on the page.")}i.extend=k;i.preprocessors=["extend","statics","inheritableStatics","mixins","config"];if(j){h=new c(j,i);h.prototype.constructor=j}else{h=new c(i)}h.prototype.override=function(n){for(var l in n){if(n.hasOwnProperty(l)){this[l]=n[l]}}};return h}}());(function(c,e,h,d,g){function a(){function i(){return this.constructor.apply(this,arguments)||null}return i}var b=Ext.ClassManager={classes:{},existCache:{},namespaceRewrites:[{from:"Ext.",to:Ext}],maps:{alternateToName:{},aliasToName:{},nameToAliases:{},nameToAlternates:{}},enableNamespaceParseCache:true,namespaceParseCache:{},instantiators:[],isCreated:function(n){var m=this.existCache,l,o,k,j,p;if(this.classes[n]||m[n]){return true}j=g;p=this.parseNamespace(n);for(l=0,o=p.length;l<o;l++){k=p[l];if(typeof k!="string"){j=k}else{if(!j||!j[k]){return false}j=j[k]}}m[n]=true;this.triggerCreated(n);return true},createdListeners:[],nameCreatedListeners:{},triggerCreated:function(s){var u=this.createdListeners,m=this.nameCreatedListeners,n=this.maps.nameToAlternates[s],t=[s],p,r,o,q,l,k;for(p=0,r=u.length;p<r;p++){l=u[p];l.fn.call(l.scope,s)}if(n){t.push.apply(t,n)}for(p=0,r=t.length;p<r;p++){k=t[p];u=m[k];if(u){for(o=0,q=u.length;o<q;o++){l=u[o];l.fn.call(l.scope,k)}delete m[k]}}},onCreated:function(m,l,k){var j=this.createdListeners,i=this.nameCreatedListeners,n={fn:m,scope:l};if(k){if(this.isCreated(k)){m.call(l,k);return}if(!i[k]){i[k]=[]}i[k].push(n)}else{j.push(n)}},parseNamespace:function(l){var j=this.namespaceParseCache,m,o,q,k,t,s,r,n,p;if(this.enableNamespaceParseCache){if(j.hasOwnProperty(l)){return j[l]}}m=[];o=this.namespaceRewrites;q=g;k=l;for(n=0,p=o.length;n<p;n++){t=o[n];s=t.from;r=t.to;if(k===s||k.substring(0,s.length)===s){k=k.substring(s.length);if(typeof r!="string"){q=r}else{m=m.concat(r.split("."))}break}}m.push(q);m=m.concat(k.split("."));if(this.enableNamespaceParseCache){j[l]=m}return m},setNamespace:function(m,p){var k=g,q=this.parseNamespace(m),o=q.length-1,j=q[o],n,l;for(n=0;n<o;n++){l=q[n];if(typeof l!="string"){k=l}else{if(!k[l]){k[l]={}}k=k[l]}}k[j]=p;return k[j]},createNamespaces:function(){var k=g,p,m,n,l,o,q;for(n=0,o=arguments.length;n<o;n++){p=this.parseNamespace(arguments[n]);for(l=0,q=p.length;l<q;l++){m=p[l];if(typeof m!="string"){k=m}else{if(!k[m]){k[m]={}}k=k[m]}}}return k},set:function(i,m){var l=this,o=l.maps,n=o.nameToAlternates,k=l.getName(m),j;l.classes[i]=l.setNamespace(i,m);if(k&&k!==i){o.alternateToName[i]=k;j=n[k]||(n[k]=[]);j.push(i)}return this},get:function(l){var n=this.classes,j,p,k,m,o;if(n[l]){return n[l]}j=g;p=this.parseNamespace(l);for(m=0,o=p.length;m<o;m++){k=p[m];if(typeof k!="string"){j=k}else{if(!j||!j[k]){return null}j=j[k]}}return j},setAlias:function(i,j){var l=this.maps.aliasToName,m=this.maps.nameToAliases,k;if(typeof i=="string"){k=i}else{k=this.getName(i)}if(j&&l[j]!==k){l[j]=k}if(!m[k]){m[k]=[]}if(j){Ext.Array.include(m[k],j)}return this},addNameAliasMappings:function(j){var o=this.maps.aliasToName,p=this.maps.nameToAliases,m,n,l,k;for(m in j){n=p[m]||(p[m]=[]);for(k=0;k<j[m].length;k++){l=j[m][k];if(!o[l]){o[l]=m;n.push(l)}}}return this},addNameAlternateMappings:function(m){var j=this.maps.alternateToName,p=this.maps.nameToAlternates,l,n,o,k;for(l in m){n=p[l]||(p[l]=[]);for(k=0;k<m[l].length;k++){o=m[l];if(!j[o]){j[o]=l;n.push(o)}}}return this},getByAlias:function(i){return this.get(this.getNameByAlias(i))},getNameByAlias:function(i){return this.maps.aliasToName[i]||""},getNameByAlternate:function(i){return this.maps.alternateToName[i]||""},getAliasesByName:function(i){return this.maps.nameToAliases[i]||[]},getName:function(i){return i&&i.$className||""},getClass:function(i){return i&&i.self||null},create:function(j,l,i){var k=a();if(typeof l=="function"){l=l(k)}l.$className=j;return new c(k,l,function(){var m=l.postprocessors||b.defaultPostprocessors,t=b.postprocessors,u=[],s,o,r,n,q,p,v;delete l.postprocessors;for(o=0,r=m.length;o<r;o++){s=m[o];if(typeof s=="string"){s=t[s];p=s.properties;if(p===true){u.push(s.fn)}else{if(p){for(n=0,q=p.length;n<q;n++){v=p[n];if(l.hasOwnProperty(v)){u.push(s.fn);break}}}}}else{u.push(s)}}l.postprocessors=u;l.createdFn=i;b.processCreate(j,this,l)})},processCreate:function(l,j,n){var m=this,i=n.postprocessors.shift(),k=n.createdFn;if(!i){if(l){m.set(l,j)}if(k){k.call(j,j)}if(l){m.triggerCreated(l)}return}if(i.call(m,l,j,n,m.processCreate)!==false){m.processCreate(l,j,n)}},createOverride:function(l,p,j){var o=this,n=p.override,k=p.requires,i=p.uses,m=function(){var q,r;if(k){r=k;k=null;Ext.Loader.require(r,m)}else{q=o.get(n);delete p.override;delete p.requires;delete p.uses;Ext.override(q,p);o.triggerCreated(l);if(i){Ext.Loader.addUsedClasses(i)}if(j){j.call(q)}}};o.existCache[l]=true;o.onCreated(m,o,n);return o},instantiateByAlias:function(){var j=arguments[0],i=h.call(arguments),k=this.getNameByAlias(j);if(!k){k=this.maps.aliasToName[j];Ext.syncRequire(k)}i[0]=k;return this.instantiate.apply(this,i)},instantiate:function(){var k=arguments[0],m=typeof k,j=h.call(arguments,1),l=k,n,i;if(m!="function"){if(m!="string"&&j.length===0){j=[k];k=k.xclass}i=this.get(k)}else{i=k}if(!i){n=this.getNameByAlias(k);if(n){k=n;i=this.get(k)}}if(!i){n=this.getNameByAlternate(k);if(n){k=n;i=this.get(k)}}if(!i){Ext.syncRequire(k);i=this.get(k)}return this.getInstantiator(j.length)(i,j)},dynInstantiate:function(j,i){i=d(i,true);i.unshift(j);return this.instantiate.apply(this,i)},getInstantiator:function(m){var l=this.instantiators,n,k,j;n=l[m];if(!n){k=m;j=[];for(k=0;k<m;k++){j.push("a["+k+"]")}n=l[m]=new Function("c","a","return new c("+j.join(",")+")")}return n},postprocessors:{},defaultPostprocessors:[],registerPostprocessor:function(j,m,k,i,l){if(!i){i="last"}if(!k){k=[j]}this.postprocessors[j]={name:j,properties:k||false,fn:m};this.setDefaultPostprocessorPosition(j,i,l);return this},setDefaultPostprocessors:function(i){this.defaultPostprocessors=d(i);return this},setDefaultPostprocessorPosition:function(j,m,l){var k=this.defaultPostprocessors,i;if(typeof m=="string"){if(m==="first"){k.unshift(j);return this}else{if(m==="last"){k.push(j);return this}}m=(m==="after")?1:-1}i=Ext.Array.indexOf(k,l);if(i!==-1){Ext.Array.splice(k,Math.max(0,i+m),0,j)}return this},getNamesByExpression:function(q){var o=this.maps.nameToAliases,r=[],j,n,l,k,s,m,p;if(q.indexOf("*")!==-1){q=q.replace(/\*/g,"(.*?)");s=new RegExp("^"+q+"$");for(j in o){if(o.hasOwnProperty(j)){l=o[j];if(j.search(s)!==-1){r.push(j)}else{for(m=0,p=l.length;m<p;m++){n=l[m];if(n.search(s)!==-1){r.push(j);break}}}}}}else{k=this.getNameByAlias(q);if(k){r.push(k)}else{k=this.getNameByAlternate(q);if(k){r.push(k)}else{r.push(q)}}}return r}};b.registerPostprocessor("alias",function(l,k,o){var j=o.alias,m,n;for(m=0,n=j.length;m<n;m++){e=j[m];this.setAlias(k,e)}},["xtype","alias"]);b.registerPostprocessor("singleton",function(j,i,l,k){if(l.singleton){k.call(this,j,new i(),l)}else{return true}return false});b.registerPostprocessor("alternateClassName",function(k,j,o){var m=o.alternateClassName,l,n,p;if(!(m instanceof Array)){m=[m]}for(l=0,n=m.length;l<n;l++){p=m[l];this.set(p,j)}});Ext.apply(Ext,{create:e(b,"instantiate"),widget:function(k,j){var o=k,l,m,i,n;if(typeof o!="string"){j=k;o=j.xtype}else{j=j||{}}if(j.isComponent){return j}l="widget."+o;m=b.getNameByAlias(l);if(!m){n=true}i=b.get(m);if(n||!i){return b.instantiateByAlias(l,j)}return new i(j)},createByAlias:e(b,"instantiateByAlias"),define:function(j,k,i){if(k.override){return b.createOverride.apply(b,arguments)}return b.create.apply(b,arguments)},getClassName:e(b,"getName"),getDisplayName:function(i){if(i){if(i.displayName){return i.displayName}if(i.$name&&i.$class){return Ext.getClassName(i.$class)+"#"+i.$name}if(i.$className){return i.$className}}return"Anonymous"},getClass:e(b,"getClass"),namespace:e(b,"createNamespaces")});Ext.createWidget=Ext.widget;Ext.ns=Ext.namespace;c.registerPreprocessor("className",function(i,j){if(j.$className){i.$className=j.$className}},true,"first");c.registerPreprocessor("alias",function(u,o){var s=u.prototype,l=d(o.xtype),j=d(o.alias),v="widget.",t=v.length,p=Array.prototype.slice.call(s.xtypesChain||[]),m=Ext.merge({},s.xtypesMap||{}),n,r,q,k;for(n=0,r=j.length;n<r;n++){q=j[n];if(q.substring(0,t)===v){k=q.substring(t);Ext.Array.include(l,k)}}u.xtype=o.xtype=l[0];o.xtypes=l;for(n=0,r=l.length;n<r;n++){k=l[n];if(!m[k]){m[k]=true;p.push(k)}}o.xtypesChain=p;o.xtypesMap=m;Ext.Function.interceptAfter(o,"onClassCreated",function(){var i=s.mixins,x,w;for(x in i){if(i.hasOwnProperty(x)){w=i[x];l=w.xtypes;if(l){for(n=0,r=l.length;n<r;n++){k=l[n];if(!m[k]){m[k]=true;p.push(k)}}}}}});for(n=0,r=l.length;n<r;n++){k=l[n];Ext.Array.include(j,v+k)}o.alias=j},["xtype","alias"])}(Ext.Class,Ext.Function.alias,Array.prototype.slice,Ext.Array.from,Ext.global));if(Ext._alternatesMetadata){Ext.ClassManager.addNameAlternateMappings(Ext._alternatesMetadata);Ext._alternatesMetadata=null}if(Ext._aliasMetadata){Ext.ClassManager.addNameAliasMappings(Ext._aliasMetadata);Ext._aliasMetadata=null}Ext.Loader=new function(){var k=this,b=Ext.ClassManager,t=Ext.Class,e=Ext.Function.flexSetter,o=Ext.Function.alias,a=Ext.Function.pass,d=Ext.Function.defer,h=Ext.Array.erase,n=["extend","mixins","requires"],v={},m=[],c=/\/\.\//g,g=/\./g,j=0;Ext.apply(k,{isInHistory:v,history:m,config:{enabled:false,scriptChainDelay:false,disableCaching:true,disableCachingParam:"_dc",garbageCollect:false,paths:{Ext:"."},preserveScripts:true,scriptCharset:undefined},setConfig:function(y,z){if(Ext.isObject(y)&&arguments.length===1){Ext.merge(k.config,y);if("paths" in y){Ext.app.collectNamespaces(y.paths)}}else{k.config[y]=(Ext.isObject(z))?Ext.merge(k.config[y],z):z;if(y==="paths"){Ext.app.collectNamespaces(z)}}return k},getConfig:function(y){if(y){return k.config[y]}return k.config},setPath:e(function(y,z){k.config.paths[y]=z;Ext.app.namespaces[y]=true;j++;return k}),addClassPathMappings:function(z){var y;if(j==0){k.config.paths=z}else{for(y in z){k.config.paths[y]=z[y]}}j++;return k},getPath:function(y){var A="",B=k.config.paths,z=k.getPrefix(y);if(z.length>0){if(z===y){return B[z]}A=B[z];y=y.substring(z.length+1)}if(A.length>0){A+="/"}return A.replace(c,"/")+y.replace(g,"/")+".js"},getPrefix:function(z){var B=k.config.paths,A,y="";if(B.hasOwnProperty(z)){return z}for(A in B){if(B.hasOwnProperty(A)&&A+"."===z.substring(0,A.length+1)){if(A.length>y.length){y=A}}}return y},isAClassNameWithAKnownPrefix:function(y){var z=k.getPrefix(y);return z!==""&&z!==y},require:function(A,z,y,B){if(z){z.call(y)}},syncRequire:function(){},exclude:function(y){return{require:function(B,A,z){return k.require(B,A,z,y)},syncRequire:function(B,A,z){return k.syncRequire(B,A,z,y)}}},onReady:function(B,A,C,y){var z;if(C!==false&&Ext.onDocumentReady){z=B;B=function(){Ext.onDocumentReady(z,A,y)}}B.call(A)}});var q=[],r={},u={},s={},p={},w=[],x=[],i={},l=function(y,z){return z.priority-y.priority};Ext.apply(k,{documentHead:typeof document!="undefined"&&(document.head||document.getElementsByTagName("head")[0]),isLoading:false,queue:q,isClassFileLoaded:r,isFileLoaded:u,readyListeners:w,optionalRequires:x,requiresMap:i,numPendingFiles:0,numLoadedFiles:0,hasFileLoadError:false,classNameToFilePathMap:s,scriptsLoading:0,syncModeEnabled:false,scriptElements:p,refreshQueue:function(){var C=q.length,z,B,y,A;if(!C&&!k.scriptsLoading){return k.triggerReady()}for(z=0;z<C;z++){B=q[z];if(B){A=B.requires;if(A.length>k.numLoadedFiles){continue}for(y=0;y<A.length;){if(b.isCreated(A[y])){h(A,y,1)}else{y++}}if(B.requires.length===0){h(q,z,1);B.callback.call(B.scope);k.refreshQueue();break}}}return k},injectScriptElement:function(y,F,C,H,A){var G=document.createElement("script"),D=false,z=k.config,E=function(){if(!D){D=true;G.onload=G.onreadystatechange=G.onerror=null;if(typeof z.scriptChainDelay=="number"){d(F,z.scriptChainDelay,H)}else{F.call(H)}k.cleanupScriptElement(G,z.preserveScripts===false,z.garbageCollect)}},B=function(I){d(C,1,H);k.cleanupScriptElement(G,z.preserveScripts===false,z.garbageCollect)};G.type="text/javascript";G.onerror=B;A=A||z.scriptCharset;if(A){G.charset=A}if("addEventListener" in G){G.onload=E}else{if("readyState" in G){G.onreadystatechange=function(){if(this.readyState=="loaded"||this.readyState=="complete"){E()}}}else{G.onload=E}}G.src=y;(k.documentHead||document.getElementsByTagName("head")[0]).appendChild(G);return G},removeScriptElement:function(y){if(p[y]){k.cleanupScriptElement(p[y],true,!!k.getConfig("garbageCollect"));delete p[y]}return k},cleanupScriptElement:function(A,z,B){var C;A.onload=A.onreadystatechange=A.onerror=null;if(z){Ext.removeNode(A);if(B){for(C in A){try{if(C!="src"){A[C]=null}delete A[C]}catch(y){}}}}return k},loadScript:function(H){var B=k.getConfig(),A=typeof H=="string",z=A?H:H.url,D=!A&&H.onError,E=!A&&H.onLoad,G=!A&&H.scope,F=function(){k.numPendingFiles--;k.scriptsLoading--;if(D){D.call(G,"Failed loading '"+z+"', please verify that the file exists")}if(k.numPendingFiles+k.scriptsLoading===0){k.refreshQueue()}},C=function(){k.numPendingFiles--;k.scriptsLoading--;if(E){E.call(G)}if(k.numPendingFiles+k.scriptsLoading===0){k.refreshQueue()}},y;k.isLoading=true;k.numPendingFiles++;k.scriptsLoading++;y=B.disableCaching?(z+"?"+B.disableCachingParam+"="+Ext.Date.now()):z;p[z]=k.injectScriptElement(y,C,F)},loadScriptFile:function(z,G,E,J,y){if(u[z]){return k}var B=k.getConfig(),K=z+(B.disableCaching?("?"+B.disableCachingParam+"="+Ext.Date.now()):""),A=false,I,C,H,D="";J=J||k;k.isLoading=true;if(!y){H=function(){};p[z]=k.injectScriptElement(K,G,H,J)}else{if(typeof XMLHttpRequest!="undefined"){I=new XMLHttpRequest()}else{I=new ActiveXObject("Microsoft.XMLHTTP")}try{I.open("GET",K,false);I.send(null)}catch(F){A=true}C=(I.status===1223)?204:(I.status===0&&((self.location||{}).protocol=="file:"||(self.location||{}).protocol=="ionp:"))?200:I.status;A=A||(C===0);if(A){}else{if((C>=200&&C<300)||(C===304)){if(!Ext.isIE){D="\n//@ sourceURL="+z}Ext.globalEval(I.responseText+D);G.call(J)}else{}}I=null}},syncRequire:function(){var y=k.syncModeEnabled;if(!y){k.syncModeEnabled=true}k.require.apply(k,arguments);if(!y){k.syncModeEnabled=false}k.refreshQueue()},require:function(Q,H,B,D){var J={},A={},G=[],S=[],P=[],z=[],F,R,L,K,y,E,O,N,M,I,C;if(D){D=(typeof D==="string")?[D]:D;for(N=0,I=D.length;N<I;N++){y=D[N];if(typeof y=="string"&&y.length>0){G=b.getNamesByExpression(y);for(M=0,C=G.length;M<C;M++){J[G[M]]=true}}}}Q=(typeof Q==="string")?[Q]:(Q?Q:[]);if(H){if(H.length>0){F=function(){var U=[],T,V;for(T=0,V=z.length;T<V;T++){U.push(b.get(z[T]))}return H.apply(this,U)}}else{F=H}}else{F=Ext.emptyFn}B=B||Ext.global;for(N=0,I=Q.length;N<I;N++){K=Q[N];if(typeof K=="string"&&K.length>0){S=b.getNamesByExpression(K);C=S.length;for(M=0;M<C;M++){O=S[M];if(J[O]!==true){z.push(O);if(!b.isCreated(O)&&!A[O]){A[O]=true;P.push(O)}}}}}if(P.length>0){if(!k.config.enabled){throw new Error("Ext.Loader is not enabled, so dependencies cannot be resolved dynamically. Missing required class"+((P.length>1)?"es":"")+": "+P.join(", "))}}else{F.call(B);return k}R=k.syncModeEnabled;if(!R){q.push({requires:P.slice(),callback:F,scope:B})}I=P.length;for(N=0;N<I;N++){E=P[N];L=k.getPath(E);if(R&&r.hasOwnProperty(E)){if(!r[E]){k.numPendingFiles--;k.removeScriptElement(L);delete r[E]}}if(!r.hasOwnProperty(E)){r[E]=false;s[E]=L;k.numPendingFiles++;k.loadScriptFile(L,a(k.onFileLoaded,[E,L],k),a(k.onFileLoadError,[E,L],k),k,R)}}if(R){F.call(B);if(I===1){return b.get(E)}}return k},onFileLoaded:function(A,z){var y=r[A];k.numLoadedFiles++;r[A]=true;u[z]=true;if(!y){k.numPendingFiles--}if(k.numPendingFiles===0){k.refreshQueue()}},onFileLoadError:function(A,z,y,B){k.numPendingFiles--;k.hasFileLoadError=true},addUsedClasses:function(A){var y,z,B;if(A){A=(typeof A=="string")?[A]:A;for(z=0,B=A.length;z<B;z++){y=A[z];if(typeof y=="string"&&!Ext.Array.contains(x,y)){x.push(y)}}}return k},triggerReady:function(){var y,z=x;if(k.isLoading){k.isLoading=false;if(z.length!==0){z=z.slice();x.length=0;k.require(z,k.triggerReady,k);return k}}Ext.Array.sort(w,l);while(w.length&&!k.isLoading){y=w.shift();y.fn.call(y.scope)}return k},onReady:function(B,A,C,y){var z;if(C!==false&&Ext.onDocumentReady){z=B;B=function(){Ext.onDocumentReady(z,A,y)}}if(!k.isLoading){B.call(A)}else{w.push({fn:B,scope:A,priority:(y&&y.priority)||0})}},historyPush:function(y){if(y&&r.hasOwnProperty(y)&&!v[y]){v[y]=true;m.push(y)}return k}});Ext.disableCacheBuster=function(z,A){var y=new Date();y.setTime(y.getTime()+(z?10*365:-1)*24*60*60*1000);y=y.toGMTString();document.cookie="ext-cache=1; expires="+y+"; path="+(A||"/")};Ext.require=o(k,"require");Ext.syncRequire=o(k,"syncRequire");Ext.exclude=o(k,"exclude");Ext.onReady=function(A,z,y){k.onReady(A,z,true,y)};t.registerPreprocessor("loader",function(O,C,N,M){var J=this,H=[],y,I=b.getName(O),B,A,G,F,L,E,z,K,D;for(B=0,G=n.length;B<G;B++){E=n[B];if(C.hasOwnProperty(E)){z=C[E];if(typeof z=="string"){H.push(z)}else{if(z instanceof Array){for(A=0,F=z.length;A<F;A++){L=z[A];if(typeof L=="string"){H.push(L)}}}else{if(typeof z!="function"){for(A in z){if(z.hasOwnProperty(A)){L=z[A];if(typeof L=="string"){H.push(L)}}}}}}}}if(H.length===0){return}k.require(H,function(){for(B=0,G=n.length;B<G;B++){E=n[B];if(C.hasOwnProperty(E)){z=C[E];if(typeof z=="string"){C[E]=b.get(z)}else{if(z instanceof Array){for(A=0,F=z.length;A<F;A++){L=z[A];if(typeof L=="string"){C[E][A]=b.get(L)}}}else{if(typeof z!="function"){for(var P in z){if(z.hasOwnProperty(P)){L=z[P];if(typeof L=="string"){C[E][P]=b.get(L)}}}}}}}}M.call(J,O,C,N)});return false},true,"after","className");b.registerPostprocessor("uses",function(A,z,B){var y=B.uses;if(y){k.addUsedClasses(y)}});b.onCreated(k.historyPush)};if(Ext._classPathMetadata){Ext.Loader.addClassPathMappings(Ext._classPathMetadata);Ext._classPathMetadata=null}(function(){var a=document.getElementsByTagName("script"),b=a[a.length-1],d=b.src,c=d.substring(0,d.lastIndexOf("/")+1),e=Ext.Loader;e.setConfig({enabled:true,disableCaching:true,paths:{Ext:c+"src"}})})();Ext._endTime=new Date().getTime();if(Ext._beforereadyhandler){Ext._beforereadyhandler()}Ext.Error=Ext.extend(Error,{statics:{ignore:false,raise:function(a){a=a||{};if(Ext.isString(a)){a={msg:a}}var c=this.raise.caller,b;if(c){if(c.$name){a.sourceMethod=c.$name}if(c.$owner){a.sourceClass=c.$owner.$className}}if(Ext.Error.handle(a)!==true){b=Ext.Error.prototype.toString.call(a);Ext.log({msg:b,level:"error",dump:a,stack:true});throw new Ext.Error(a)}},handle:function(){return Ext.Error.ignore}},name:"Ext.Error",constructor:function(a){if(Ext.isString(a)){a={msg:a}}var b=this;Ext.apply(b,a);b.message=b.message||b.msg},toString:function(){var c=this,b=c.sourceClass?c.sourceClass:"",a=c.sourceMethod?"."+c.sourceMethod+"(): ":"",d=c.msg||"(No description provided)";return b+a+d}});Ext.deprecated=function(a){return Ext.emptyFn};Ext.JSON=(new (function(){var me=this,encodingFunction,decodingFunction,useNative=null,useHasOwn=!!{}.hasOwnProperty,isNative=function(){if(useNative===null){useNative=Ext.USE_NATIVE_JSON&&window.JSON&&JSON.toString()=="[object JSON]"}return useNative},pad=function(n){return n<10?"0"+n:n},doDecode=function(json){return eval("("+json+")")},doEncode=function(o,newline){if(o===null||o===undefined){return"null"}else{if(Ext.isDate(o)){return Ext.JSON.encodeDate(o)}else{if(Ext.isString(o)){return Ext.JSON.encodeString(o)}else{if(typeof o=="number"){return isFinite(o)?String(o):"null"}else{if(Ext.isBoolean(o)){return String(o)}else{if(o.toJSON){return o.toJSON()}else{if(Ext.isArray(o)){return encodeArray(o,newline)}else{if(Ext.isObject(o)){return encodeObject(o,newline)}else{if(typeof o==="function"){return"null"}}}}}}}}}return"undefined"},m={"\b":"\\b","\t":"\\t","\n":"\\n","\f":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\","\x0b":"\\u000b"},charToReplace=/[\\\"\x00-\x1f\x7f-\uffff]/g,encodeString=function(s){return'"'+s.replace(charToReplace,function(a){var c=m[a];return typeof c==="string"?c:"\\u"+("0000"+a.charCodeAt(0).toString(16)).slice(-4)})+'"'},encodeArray=function(o,newline){var a=["[",""],len=o.length,i;for(i=0;i<len;i+=1){a.push(Ext.JSON.encodeValue(o[i]),",")}a[a.length-1]="]";return a.join("")},encodeObject=function(o,newline){var a=["{",""],i,val;for(i in o){val=o[i];if(!useHasOwn||o.hasOwnProperty(i)){if(typeof val==="function"||val===undefined){continue}a.push(Ext.JSON.encodeValue(i),":",Ext.JSON.encodeValue(val),",")}}a[a.length-1]="}";return a.join("")};me.encodeString=encodeString;me.encodeValue=doEncode;me.encodeDate=function(o){return'"'+o.getFullYear()+"-"+pad(o.getMonth()+1)+"-"+pad(o.getDate())+"T"+pad(o.getHours())+":"+pad(o.getMinutes())+":"+pad(o.getSeconds())+'"'};me.encode=function(o){if(!encodingFunction){encodingFunction=isNative()?JSON.stringify:me.encodeValue}return encodingFunction(o)};me.decode=function(json,safe){if(!decodingFunction){decodingFunction=isNative()?JSON.parse:doDecode}try{return decodingFunction(json)}catch(e){if(safe===true){return null}Ext.Error.raise({sourceClass:"Ext.JSON",sourceMethod:"decode",msg:"You're trying to decode an invalid JSON String: "+json})}}})());Ext.encode=Ext.JSON.encode;Ext.decode=Ext.JSON.decode;Ext.apply(Ext,{userAgent:navigator.userAgent.toLowerCase(),cache:{},idSeed:1000,windowId:"ext-window",documentId:"ext-document",isReady:false,enableGarbageCollector:true,enableListenerCollection:true,rootHierarchyState:{},addCacheEntry:function(g,c,e){e=e||c.dom;var a=Ext.cache,b=g||(c&&c.id)||e.id,d=a[b]||(a[b]={data:{},events:{},dom:e,skipGarbageCollection:!!(e.getElementById||e.navigator)});if(c){c.$cache=d;d.el=c}return d},updateCacheEntry:function(a,b){a.dom=b;if(a.el){a.el.dom=b}return a},id:function(a,c){var b=this,d="";a=Ext.getDom(a,true)||{};if(a===document){a.id=b.documentId}else{if(a===window){a.id=b.windowId}}if(!a.id){if(b.isSandboxed){d=Ext.sandboxName.toLowerCase()+"-"}a.id=d+(c||"ext-gen")+(++Ext.idSeed)}return a.id},escapeId:(function(){var c=/^[a-zA-Z_][a-zA-Z0-9_\-]*$/i,d=/([\W]{1})/g,b=/^(\d)/g,a=function(h,g){return"\\"+g},e=function(h,g){return"\\00"+g.charCodeAt(0).toString(16)+" "};return function(g){return c.test(g)?g:g.replace(d,a).replace(b,e)}}()),getBody:(function(){var a;return function(){return a||(a=Ext.get(document.body))}}()),getHead:(function(){var a;return function(){return a||(a=Ext.get(document.getElementsByTagName("head")[0]))}}()),getDoc:(function(){var a;return function(){return a||(a=Ext.get(document))}}()),getOrientation:function(){return window.innerHeight>window.innerWidth?"portrait":"landscape"},destroy:function(){var c=arguments.length,b,a;for(b=0;b<c;b++){a=arguments[b];if(a){if(Ext.isArray(a)){this.destroy.apply(this,a)}else{if(Ext.isFunction(a.destroy)){a.destroy()}else{if(a.dom){a.remove()}}}}}},callback:function(d,c,b,a){if(Ext.isFunction(d)){b=b||[];c=c||window;if(a){Ext.defer(d,a,c,b)}else{d.apply(c,b)}}},htmlEncode:function(a){return Ext.String.htmlEncode(a)},htmlDecode:function(a){return Ext.String.htmlDecode(a)},urlAppend:function(a,b){return Ext.String.urlAppend(a,b)}});Ext.ns=Ext.namespace;window.undefined=window.undefined;(function(){var p=function(e){return e.test(Ext.userAgent)},u=document.compatMode=="CSS1Compat",G=function(S,R){var e;return(S&&(e=R.exec(Ext.userAgent)))?parseFloat(e[1]):0},q=document.documentMode,a=p(/opera/),w=a&&p(/version\/10\.5/),L=p(/\bchrome\b/),A=p(/webkit/),c=!L&&p(/safari/),J=c&&p(/applewebkit\/4/),H=c&&p(/version\/3/),E=c&&p(/version\/4/),k=c&&p(/version\/5\.0/),D=c&&p(/version\/5/),j=!a&&p(/msie/),K=j&&((p(/msie 7/)&&q!=8&&q!=9&&q!=10)||q==7),I=j&&((p(/msie 8/)&&q!=7&&q!=9&&q!=10)||q==8),F=j&&((p(/msie 9/)&&q!=7&&q!=8&&q!=10)||q==9),h=j&&((p(/msie 10/)&&q!=7&&q!=8&&q!=9)||q==10),N=j&&p(/msie 6/),b=!A&&p(/gecko/),Q=b&&p(/rv:1\.9/),P=b&&p(/rv:2\.0/),O=b&&p(/rv:5\./),s=b&&p(/rv:10\./),z=Q&&p(/rv:1\.9\.0/),x=Q&&p(/rv:1\.9\.1/),v=Q&&p(/rv:1\.9\.2/),g=p(/windows|win32/),C=p(/macintosh|mac os x/),y=p(/linux/),m=null,n=G(true,/\bchrome\/(\d+\.\d+)/),i=G(true,/\bfirefox\/(\d+\.\d+)/),o=G(j,/msie (\d+\.\d+)/),t=G(a,/version\/(\d+\.\d+)/),d=G(c,/version\/(\d+\.\d+)/),B=G(A,/webkit\/(\d+\.\d+)/),r=/^https/i.test(window.location.protocol),l;try{document.execCommand("BackgroundImageCache",false,true)}catch(M){}l=function(){};l.info=l.warn=l.error=Ext.emptyFn;Ext.setVersion("extjs","4.2.0.663");Ext.apply(Ext,{SSL_SECURE_URL:r&&j?"javascript:''":"about:blank",plainTableCls:Ext.buildSettings.baseCSSPrefix+"table-plain",plainListCls:Ext.buildSettings.baseCSSPrefix+"list-plain",enableNestedListenerRemoval:false,USE_NATIVE_JSON:false,getDom:function(S,R){if(!S||!document){return null}if(S.dom){return S.dom}else{if(typeof S=="string"){var T=Ext.getElementById(S);if(T&&j&&R){if(S==T.getAttribute("id")){return T}else{return null}}return T}else{return S}}},removeNode:N||K||I?(function(){var e;return function(T){if(T&&T.tagName.toUpperCase()!="BODY"){(Ext.enableNestedListenerRemoval)?Ext.EventManager.purgeElement(T):Ext.EventManager.removeAll(T);var R=Ext.cache,S=T.id;if(R[S]){delete R[S].dom;delete R[S]}if(I&&T.parentNode){T.parentNode.removeChild(T)}e=e||document.createElement("div");e.appendChild(T);e.innerHTML=""}}}()):function(S){if(S&&S.parentNode&&S.tagName.toUpperCase()!="BODY"){(Ext.enableNestedListenerRemoval)?Ext.EventManager.purgeElement(S):Ext.EventManager.removeAll(S);var e=Ext.cache,R=S.id;if(e[R]){delete e[R].dom;delete e[R]}S.parentNode.removeChild(S)}},isStrict:u,isIEQuirks:j&&(!u&&(N||K||I||F)),isOpera:a,isOpera10_5:w,isWebKit:A,isChrome:L,isSafari:c,isSafari3:H,isSafari4:E,isSafari5:D,isSafari5_0:k,isSafari2:J,isIE:j,isIE6:N,isIE7:K,isIE7m:N||K,isIE7p:j&&!N,isIE8:I,isIE8m:N||K||I,isIE8p:j&&!(N||K),isIE9:F,isIE9m:N||K||I||F,isIE9p:j&&!(N||K||I),isIE10:h,isIE10m:N||K||I||F||h,isIE10p:j&&!(N||K||I||F),isGecko:b,isGecko3:Q,isGecko4:P,isGecko5:O,isGecko10:s,isFF3_0:z,isFF3_5:x,isFF3_6:v,isFF4:4<=i&&i<5,isFF5:5<=i&&i<6,isFF10:10<=i&&i<11,isLinux:y,isWindows:g,isMac:C,chromeVersion:n,firefoxVersion:i,ieVersion:o,operaVersion:t,safariVersion:d,webKitVersion:B,isSecure:r,BLANK_IMAGE_URL:(N||K)?"//www.sencha.com/s.gif":"",value:function(S,e,R){return Ext.isEmpty(S,R)?e:S},escapeRe:function(e){return e.replace(/([-.*+?\^${}()|\[\]\/\\])/g,"\\$1")},addBehaviors:function(U){if(!Ext.isReady){Ext.onReady(function(){Ext.addBehaviors(U)})}else{var R={},T,e,S;for(e in U){if((T=e.split("@"))[1]){S=T[0];if(!R[S]){R[S]=Ext.select(S)}R[S].on(T[1],U[e])}}R=null}},getScrollbarSize:function(R){if(!Ext.isReady){return{}}if(R||!m){var e=document.body,S=document.createElement("div");S.style.width=S.style.height="100px";S.style.overflow="scroll";S.style.position="absolute";e.appendChild(S);m={width:S.offsetWidth-S.clientWidth,height:S.offsetHeight-S.clientHeight};e.removeChild(S)}return m},getScrollBarWidth:function(R){var e=Ext.getScrollbarSize(R);return e.width+2},copyTo:function(R,T,V,U){if(typeof V=="string"){V=V.split(/[,;\s]/)}var W,S=V?V.length:0,e;for(W=0;W<S;W++){e=V[W];if(U||T.hasOwnProperty(e)){R[e]=T[e]}}return R},destroyMembers:function(T){for(var S=1,R=arguments,e=R.length;S<e;S++){Ext.destroy(T[R[S]]);delete T[R[S]]}},log:l,partition:function(e,U){var V=[[],[]],R,T,S=e.length;for(R=0;R<S;R++){T=e[R];V[(U&&U(T,R,e))||(!U&&T)?0:1].push(T)}return V},invoke:function(e,U){var W=[],V=Array.prototype.slice.call(arguments,2),R,T,S=e.length;for(R=0;R<S;R++){T=e[R];if(T&&typeof T[U]=="function"){W.push(T[U].apply(T,V))}else{W.push(undefined)}}return W},zip:function(){var X=Ext.partition(arguments,function(Y){return typeof Y!="function"}),U=X[0],W=X[1][0],e=Ext.max(Ext.pluck(U,"length")),T=[],V,S,R;for(V=0;V<e;V++){T[V]=[];if(W){T[V]=W.apply(W,Ext.pluck(U,V))}else{for(S=0,R=U.length;S<R;S++){T[V].push(U[S][V])}}}return T},toSentence:function(R,e){var U=R.length,T,S;if(U<=1){return R[0]}else{T=R.slice(0,U-1);S=R[U-1];return Ext.util.Format.format("{0} {1} {2}",T.join(", "),e||"and",S)}},setGlyphFontFamily:function(e){Ext._glyphFontFamily=e},useShims:N})}());Ext.application=function(a){var c,d,b;if(typeof a==="string"){Ext.require(a,function(){c=Ext.ClassManager.get(a)})}else{Ext.Loader.setPath(a.name,a.appFolder||"app");if(d=a.paths){for(b in d){if(d.hasOwnProperty(b)){Ext.Loader.setPath(b,d[b])}}}a["paths processed"]=true;Ext.define(a.name+".$application",Ext.apply({extend:"Ext.app.Application"},a),function(){c=this})}Ext.onReady(function(){Ext.app.Application.instance=new c()})};(function(){Ext.ns("Ext.util");Ext.util.Format={};var g=Ext.util.Format,e=/<\/?[^>]+>/gi,c=/(?:<script.*?>)((\n|\r|.)*?)(?:<\/script>)/ig,b=/\r?\n/g,d=/[^\d\.]/g,a;Ext.apply(g,{thousandSeparator:",",decimalSeparator:".",currencyPrecision:2,currencySign:"$",currencyAtEnd:false,undef:function(h){return h!==undefined?h:""},defaultValue:function(i,h){return i!==undefined&&i!==""?i:h},substr:"ab".substr(-1)!="b"?function(i,k,h){var j=String(i);return(k<0)?j.substr(Math.max(j.length+k,0),h):j.substr(k,h)}:function(i,j,h){return String(i).substr(j,h)},lowercase:function(h){return String(h).toLowerCase()},uppercase:function(h){return String(h).toUpperCase()},usMoney:function(h){return g.currency(h,"$",2)},currency:function(k,m,j,h){var o="",n=",0",l=0;k=k-0;if(k<0){k=-k;o="-"}j=Ext.isDefined(j)?j:g.currencyPrecision;n+=n+(j>0?".":"");for(;l<j;l++){n+="0"}k=g.number(k,n);if((h||g.currencyAtEnd)===true){return Ext.String.format("{0}{1}{2}",o,k,m||g.currencySign)}else{return Ext.String.format("{0}{1}{2}",o,m||g.currencySign,k)}},date:function(h,i){if(!h){return""}if(!Ext.isDate(h)){h=new Date(Date.parse(h))}return Ext.Date.dateFormat(h,i||Ext.Date.defaultFormat)},dateRenderer:function(h){return function(i){return g.date(i,h)}},stripTags:function(h){return !h?h:String(h).replace(e,"")},stripScripts:function(h){return !h?h:String(h).replace(c,"")},fileSize:function(h){if(h<1024){return h+" bytes"}else{if(h<1048576){return(Math.round(((h*10)/1024))/10)+" KB"}else{return(Math.round(((h*10)/1048576))/10)+" MB"}}},math:(function(){var h={};return function(j,i){if(!h[i]){h[i]=Ext.functionFactory("v","return v "+i+";")}return h[i](j)}}()),round:function(j,i){var h=Number(j);if(typeof i=="number"){i=Math.pow(10,i);h=Math.round(j*i)/i}return h},number:function(y,s){if(!s){return y}y=Ext.Number.from(y,NaN);if(isNaN(y)){return""}var z=g.thousandSeparator,q=g.decimalSeparator,r=y<0,k,h,x,w,p,t,o,l,u;y=Math.abs(y);if(s.substr(s.length-2)=="/i"){if(!a){a=new RegExp("[^\\d\\"+g.decimalSeparator+"]","g")}s=s.substr(0,s.length-2);k=s.indexOf(z)!=-1;h=s.replace(a,"").split(q)}else{k=s.indexOf(",")!=-1;h=s.replace(d,"").split(".")}if(h.length>2){}else{if(h.length>1){y=Ext.Number.toFixed(y,h[1].length)}else{y=Ext.Number.toFixed(y,0)}}x=y.toString();h=x.split(".");if(k){w=h[0];p=[];t=w.length;o=Math.floor(t/3);l=w.length%3||3;for(u=0;u<t;u+=l){if(u!==0){l=3}p[p.length]=w.substr(u,l);o-=1}x=p.join(z);if(h[1]){x+=q+h[1]}}else{if(h[1]){x=h[0]+q+h[1]}}if(r){r=x.replace(/[^1-9]/g,"")!==""}return(r?"-":"")+s.replace(/[\d,?\.?]+/,x)},numberRenderer:function(h){return function(i){return g.number(i,h)}},attributes:function(i){if(typeof i==="object"){var h=[],j;for(j in i){h.push(j,'="',j==="style"?Ext.DomHelper.generateStyles(i[j]):Ext.htmlEncode(i[j]),'"')}i=h.join("")}return i||""},plural:function(h,i,j){return h+" "+(h==1?i:(j?j:i+"s"))},nl2br:function(h){return Ext.isEmpty(h)?"":h.replace(b,"<br/>")},capitalize:Ext.String.capitalize,ellipsis:Ext.String.ellipsis,format:Ext.String.format,htmlDecode:Ext.String.htmlDecode,htmlEncode:Ext.String.htmlEncode,leftPad:Ext.String.leftPad,trim:Ext.String.trim,parseBox:function(i){i=i||0;if(typeof i==="number"){return{top:i,right:i,bottom:i,left:i}}var j=i.split(" "),h=j.length;if(h==1){j[1]=j[2]=j[3]=j[0]}else{if(h==2){j[2]=j[0];j[3]=j[1]}else{if(h==3){j[3]=j[1]}}}return{top:parseInt(j[0],10)||0,right:parseInt(j[1],10)||0,bottom:parseInt(j[2],10)||0,left:parseInt(j[3],10)||0}},escapeRegex:function(h){return h.replace(/([\-.*+?\^${}()|\[\]\/\\])/g,"\\$1")}})}());Ext.define("Ext.util.TaskRunner",{interval:10,timerId:null,constructor:function(a){var b=this;if(typeof a=="number"){b.interval=a}else{if(a){Ext.apply(b,a)}}b.tasks=[];b.timerFn=Ext.Function.bind(b.onTick,b)},newTask:function(b){var a=new Ext.util.TaskRunner.Task(b);a.manager=this;return a},start:function(a){var c=this,b=new Date().getTime();if(!a.pending){c.tasks.push(a);a.pending=true}a.stopped=false;a.taskStartTime=b;a.taskRunTime=a.fireOnStart!==false?0:a.taskStartTime;a.taskRunCount=0;if(!c.firing){if(a.fireOnStart!==false){c.startTimer(0,b)}else{c.startTimer(a.interval,b)}}return a},stop:function(a){if(!a.stopped){a.stopped=true;if(a.onStop){a.onStop.call(a.scope||a,a)}}return a},stopAll:function(){Ext.each(this.tasks,this.stop,this)},firing:false,nextExpires:1e+99,onTick:function(){var m=this,e=m.tasks,a=new Date().getTime(),n=1e+99,k=e.length,c,o,h,b,d,g;m.timerId=null;m.firing=true;for(h=0;h<k||h<(k=e.length);++h){b=e[h];if(!(g=b.stopped)){c=b.taskRunTime+b.interval;if(c<=a){d=1;try{d=b.run.apply(b.scope||b,b.args||[++b.taskRunCount])}catch(j){try{if(b.onError){d=b.onError.call(b.scope||b,b,j)}}catch(l){}}b.taskRunTime=a;if(d===false||b.taskRunCount===b.repeat){m.stop(b);g=true}else{g=b.stopped;c=a+b.interval}}if(!g&&b.duration&&b.duration<=(a-b.taskStartTime)){m.stop(b);g=true}}if(g){b.pending=false;if(!o){o=e.slice(0,h)}}else{if(o){o.push(b)}if(n>c){n=c}}}if(o){m.tasks=o}m.firing=false;if(m.tasks.length){m.startTimer(n-a,new Date().getTime())}if(m.fireIdleEvent!==false){Ext.EventManager.idleEvent.fire()}},startTimer:function(e,c){var d=this,b=c+e,a=d.timerId;if(a&&d.nextExpires-b>d.interval){clearTimeout(a);a=null}if(!a){if(e<d.interval){e=d.interval}d.timerId=setTimeout(d.timerFn,e);d.nextExpires=b}}},function(){var b=this,a=b.prototype;a.destroy=a.stopAll;Ext.util.TaskManager=Ext.TaskManager=new b();b.Task=new Ext.Class({isTask:true,stopped:true,fireOnStart:false,constructor:function(c){Ext.apply(this,c)},restart:function(c){if(c!==undefined){this.interval=c}this.manager.start(this)},start:function(c){if(this.stopped){this.restart(c)}},stop:function(){this.manager.stop(this)}});a=b.Task.prototype;a.destroy=a.stop});Ext.define("Ext.util.TaskManager",{extend:Ext.util.TaskRunner,alternateClassName:["Ext.TaskManager"],singleton:true});Ext.define("Ext.perf.Accumulator",(function(){var c=null,h=Ext.global.chrome,d,b=function(){b=function(){return new Date().getTime()};var l,m;if(Ext.isChrome&&h&&h.Interval){l=new h.Interval();l.start();b=function(){return l.microseconds()/1000}}else{if(window.ActiveXObject){try{m=new ActiveXObject("SenchaToolbox.Toolbox");Ext.senchaToolbox=m;b=function(){return m.milliseconds}}catch(n){}}else{if(Date.now){b=Date.now}}}Ext.perf.getTimestamp=Ext.perf.Accumulator.getTimestamp=b;return b()};function i(m,l){m.sum+=l;m.min=Math.min(m.min,l);m.max=Math.max(m.max,l)}function e(o){var m=o?o:(b()-this.time),n=this,l=n.accum;++l.count;if(!--l.depth){i(l.total,m)}i(l.pure,m-n.childTime);c=n.parent;if(c){++c.accum.childCount;c.childTime+=m}}function a(){return{min:Number.MAX_VALUE,max:0,sum:0}}function j(m,l){return function(){var o=m.enter(),n=l.apply(this,arguments);o.leave();return n}}function k(l){return Math.round(l*100)/100}function g(n,m,l,p){var o={avg:0,min:p.min,max:p.max,sum:0};if(n){l=l||0;o.sum=p.sum-m*l;o.avg=o.sum/n}return o}return{constructor:function(l){var m=this;m.count=m.childCount=m.depth=m.maxDepth=0;m.pure=a();m.total=a();m.name=l},statics:{getTimestamp:b},format:function(l){if(!d){d=new Ext.XTemplate(["{name} - {count} call(s)",'<tpl if="count">','<tpl if="childCount">'," ({childCount} children)","</tpl>",'<tpl if="depth - 1">'," ({depth} deep)","</tpl>",'<tpl for="times">',", {type}: {[this.time(values.sum)]} msec (","avg={[this.time(values.sum / parent.count)]}",")","</tpl>","</tpl>"].join(""),{time:function(n){return Math.round(n*100)/100}})}var m=this.getData(l);m.name=this.name;m.pure.type="Pure";m.total.type="Total";m.times=[m.pure,m.total];return d.apply(m)},getData:function(l){var m=this;return{count:m.count,childCount:m.childCount,depth:m.maxDepth,pure:g(m.count,m.childCount,l,m.pure),total:g(m.count,m.childCount,l,m.total)}},enter:function(){var l=this,m={accum:l,leave:e,childTime:0,parent:c};++l.depth;if(l.maxDepth<l.depth){l.maxDepth=l.depth}c=m;m.time=b();return m},monitor:function(n,m,l){var o=this.enter();if(l){n.apply(m,l)}else{n.call(m)}o.leave()},report:function(){Ext.log(this.format())},tap:function(t,v){var u=this,o=typeof v=="string"?[v]:v,s,w,q,p,n,m,l,r;r=function(){if(typeof t=="string"){s=Ext.global;p=t.split(".");for(q=0,n=p.length;q<n;++q){s=s[p[q]]}}else{s=t}for(q=0,n=o.length;q<n;++q){m=o[q];w=m.charAt(0)=="!";if(w){m=m.substring(1)}else{w=!(m in s.prototype)}l=w?s:s.prototype;l[m]=j(u,l[m])}};Ext.ClassManager.onCreated(r,u,t);return u}}}()),function(){Ext.perf.getTimestamp=this.getTimestamp});Ext.define("Ext.perf.Monitor",{singleton:true,alternateClassName:"Ext.Perf",constructor:function(){this.accumulators=[];this.accumulatorsByName={}},calibrate:function(){var b=new Ext.perf.Accumulator("$"),g=b.total,c=Ext.perf.Accumulator.getTimestamp,e=0,h,a,d;d=c();do{h=b.enter();h.leave();++e}while(g.sum<100);a=c();return(a-d)/e},get:function(b){var c=this,a=c.accumulatorsByName[b];if(!a){c.accumulatorsByName[b]=a=new Ext.perf.Accumulator(b);c.accumulators.push(a)}return a},enter:function(a){return this.get(a).enter()},monitor:function(a,c,b){this.get(a).monitor(c,b)},report:function(){var c=this,b=c.accumulators,a=c.calibrate();b.sort(function(e,d){return(e.name<d.name)?-1:((d.name<e.name)?1:0)});c.updateGC();Ext.log("Calibration: "+Math.round(a*100)/100+" msec/sample");Ext.each(b,function(d){Ext.log(d.format(a))})},getData:function(c){var b={},a=this.accumulators;Ext.each(a,function(d){if(c||d.count){b[d.name]=d.getData()}});return b},reset:function(){Ext.each(this.accumulators,function(a){var b=a;b.count=b.childCount=b.depth=b.maxDepth=0;b.pure={min:Number.MAX_VALUE,max:0,sum:0};b.total={min:Number.MAX_VALUE,max:0,sum:0}})},updateGC:function(){var a=this.accumulatorsByName.GC,b=Ext.senchaToolbox,c;if(a){a.count=b.garbageCollectionCounter||0;if(a.count){c=a.pure;a.total.sum=c.sum=b.garbageCollectionMilliseconds;c.min=c.max=c.sum/a.count;c=a.total;c.min=c.max=c.sum/a.count}}},watchGC:function(){Ext.perf.getTimestamp();var a=Ext.senchaToolbox;if(a){this.get("GC");a.watchGarbageCollector(false)}},setup:function(c){if(!c){c={render:{"Ext.AbstractComponent":"render"},layout:{"Ext.layout.Context":"run"}}}this.currentConfig=c;var d,g,b,e,a;for(d in c){if(c.hasOwnProperty(d)){g=c[d];b=Ext.Perf.get(d);for(e in g){if(g.hasOwnProperty(e)){a=g[e];b.tap(e,a)}}}}this.watchGC()}});Ext.is={init:function(b){var c=this.platforms,e=c.length,d,a;b=b||window.navigator;for(d=0;d<e;d++){a=c[d];this[a.identity]=a.regex.test(b[a.property])}this.Desktop=this.Mac||this.Windows||(this.Linux&&!this.Android);this.Tablet=this.iPad;this.Phone=!this.Desktop&&!this.Tablet;this.iOS=this.iPhone||this.iPad||this.iPod;this.Standalone=!!window.navigator.standalone},platforms:[{property:"platform",regex:/iPhone/i,identity:"iPhone"},{property:"platform",regex:/iPod/i,identity:"iPod"},{property:"userAgent",regex:/iPad/i,identity:"iPad"},{property:"userAgent",regex:/Blackberry/i,identity:"Blackberry"},{property:"userAgent",regex:/Android/i,identity:"Android"},{property:"platform",regex:/Mac/i,identity:"Mac"},{property:"platform",regex:/Win/i,identity:"Windows"},{property:"platform",regex:/Linux/i,identity:"Linux"}]};Ext.is.init();(function(){var a=function(g,e){var d=g.ownerDocument.defaultView,h=(d?d.getComputedStyle(g,null):g.currentStyle)||g.style;return h[e]},c={"IE6-quirks":[0,1,0,0,1,0,0,0,1,0,0,0,0,0,0,0,1,1,0,0,0,0,1,0,0,1,0,0,1,0,1,0,0],"IE6-strict":[0,1,0,0,1,0,0,0,1,0,0,0,0,0,0,0,1,1,0,0,0,0,1,0,1,1,0,0,1,0,1,0,0],"IE7-quirks":[0,1,0,0,1,0,0,0,1,0,0,0,0,0,0,0,1,1,0,0,0,0,1,0,0,1,0,0,1,0,1,0,0],"IE7-strict":[0,1,0,0,1,0,0,0,1,0,0,0,0,0,0,0,1,1,0,0,0,0,1,1,0,1,0,0,1,0,1,0,0],"IE8-quirks":[0,1,0,0,1,0,0,0,1,0,0,0,0,0,0,0,1,1,0,0,0,0,1,0,0,1,0,0,1,0,1,0,0],"IE8-strict":[0,1,0,0,1,0,0,0,1,0,0,0,0,0,0,0,1,1,0,0,0,0,1,1,1,1,0,0,1,0,1,0,0],"IE9-quirks":[0,1,0,0,1,0,0,0,1,0,0,0,0,0,0,0,1,1,1,0,0,0,1,0,0,1,0,0,1,0,1,0,0],"IE9-strict":[0,1,0,0,1,1,1,1,1,1,1,0,0,0,1,1,1,1,1,0,1,1,1,1,1,1,1,0,1,0,0,0,0],"IE10-quirks":[1,1,0,0,1,1,1,1,0,1,1,1,0,0,1,1,1,1,1,1,0,1,0,1,1,1,1,1,1,0,0,0],"IE10-strict":[1,1,0,0,1,1,1,1,0,1,1,1,0,0,1,1,1,1,1,1,0,1,0,1,1,1,1,1,1,0,0,0]};function b(){var d=Ext.isIE6?"IE6":Ext.isIE7?"IE7":Ext.isIE8?"IE8":Ext.isIE9?"IE9":Ext.isIE10?"IE10":"";return d?d+(Ext.isStrict?"-strict":"-quirks"):""}Ext.supports={init:function(){var k=this,o=document,i=k.toRun||k.tests,h=i.length,d=h&&Ext.isReady&&o.createElement("div"),e=[],l=b(),j,g,m;if(d){d.innerHTML=['<div style="height:30px;width:50px;">','<div style="height:20px;width:20px;"></div>',"</div>",'<div style="width: 200px; height: 200px; position: relative; padding: 5px;">','<div style="position: absolute; top: 0; left: 0; width: 100%; height: 100%;"></div>',"</div>",'<div style="position: absolute; left: 10%; top: 10%;"></div>','<div style="float:left; background-color:transparent;"></div>'].join("");o.body.appendChild(d)}g=c[l];while(h--){j=i[h];m=g&&g[h];if(m!==undefined){k[j.identity]=m}else{if(d||j.early){k[j.identity]=j.fn.call(k,o,d)}else{e.push(j)}}}if(d){o.body.removeChild(d)}k.toRun=e},PointerEvents:"pointerEvents" in document.documentElement.style,LocalStorage:(function(){try{return"localStorage" in window&&window.localStorage!==null}catch(d){return false}})(),CSS3BoxShadow:"boxShadow" in document.documentElement.style||"WebkitBoxShadow" in document.documentElement.style||"MozBoxShadow" in document.documentElement.style,ClassList:!!document.documentElement.classList,OrientationChange:((typeof window.orientation!="undefined")&&("onorientationchange" in window)),DeviceMotion:("ondevicemotion" in window),Touch:("ontouchstart" in window)&&(!Ext.is.Desktop),TimeoutActualLateness:(function(){setTimeout(function(){Ext.supports.TimeoutActualLateness=arguments.length!==0},0)}()),tests:[{identity:"Transitions",fn:function(k,m){var j=["webkit","Moz","o","ms","khtml"],l="TransitionEnd",d=[j[0]+l,"transitionend",j[2]+l,j[3]+l,j[4]+l],h=j.length,g=0,e=false;for(;g<h;g++){if(a(m,j[g]+"TransitionProperty")){Ext.supports.CSS3Prefix=j[g];Ext.supports.CSS3TransitionEnd=d[g];e=true;break}}return e}},{identity:"RightMargin",fn:function(e,g){var d=e.defaultView;return !(d&&d.getComputedStyle(g.firstChild.firstChild,null).marginRight!="0px")}},{identity:"DisplayChangeInputSelectionBug",early:true,fn:function(){var d=Ext.webKitVersion;return 0<d&&d<533}},{identity:"DisplayChangeTextAreaSelectionBug",early:true,fn:function(){var d=Ext.webKitVersion;return 0<d&&d<534.24}},{identity:"TransparentColor",fn:function(e,g,d){d=e.defaultView;return !(d&&d.getComputedStyle(g.lastChild,null).backgroundColor!="transparent")}},{identity:"ComputedStyle",fn:function(e,g,d){d=e.defaultView;return d&&d.getComputedStyle}},{identity:"Svg",fn:function(d){return !!d.createElementNS&&!!d.createElementNS("http://www.w3.org/2000/svg","svg").createSVGRect}},{identity:"Canvas",fn:function(d){return !!d.createElement("canvas").getContext}},{identity:"Vml",fn:function(e){var g=e.createElement("div");g.innerHTML="<!--[if vml]><br/><br/><![endif]-->";return(g.childNodes.length==2)}},{identity:"Float",fn:function(d,e){return !!e.lastChild.style.cssFloat}},{identity:"AudioTag",fn:function(d){return !!d.createElement("audio").canPlayType}},{identity:"History",fn:function(){var d=window.history;return !!(d&&d.pushState)}},{identity:"CSS3DTransform",fn:function(){return(typeof WebKitCSSMatrix!="undefined"&&new WebKitCSSMatrix().hasOwnProperty("m41"))}},{identity:"CSS3LinearGradient",fn:function(j,d){var l="background-image:",k="-webkit-gradient(linear, left top, right bottom, from(black), to(white))",i="linear-gradient(left top, black, white)",h="-moz-"+i,e="-ms-"+i,g="-o-"+i,m=[l+k,l+i,l+h,l+e,l+g];d.style.cssText=m.join(";");return((""+d.style.backgroundImage).indexOf("gradient")!==-1)&&!Ext.isIE9}},{identity:"CSS3BorderRadius",fn:function(h,j){var e=["borderRadius","BorderRadius","MozBorderRadius","WebkitBorderRadius","OBorderRadius","KhtmlBorderRadius"],g=false,d;for(d=0;d<e.length;d++){if(document.body.style[e[d]]!==undefined){return true}}return g}},{identity:"GeoLocation",fn:function(){return(typeof navigator!="undefined"&&"geolocation" in navigator)||(typeof google!="undefined"&&typeof google.gears!="undefined")}},{identity:"MouseEnterLeave",fn:function(d,e){return("onmouseenter" in e&&"onmouseleave" in e)}},{identity:"MouseWheel",fn:function(d,e){return("onmousewheel" in e)}},{identity:"Opacity",fn:function(d,e){if(Ext.isIE6||Ext.isIE7||Ext.isIE8){return false}e.firstChild.style.cssText="opacity:0.73";return e.firstChild.style.opacity=="0.73"}},{identity:"Placeholder",fn:function(d){return"placeholder" in d.createElement("input")}},{identity:"Direct2DBug",fn:function(){return Ext.isString(document.body.style.msTransformOrigin)&&Ext.isIE10m}},{identity:"BoundingClientRect",fn:function(d,e){return Ext.isFunction(e.getBoundingClientRect)}},{identity:"RotatedBoundingClientRect",fn:function(){var d=document.body,e=false,h=document.createElement("div"),g=h.style;if(h.getBoundingClientRect){g.WebkitTransform=g.MozTransform=g.OTransform=g.transform="rotate(90deg)";g.width="100px";g.height="30px";d.appendChild(h);e=h.getBoundingClientRect().height!==100;d.removeChild(h)}return e}},{identity:"IncludePaddingInWidthCalculation",fn:function(d,e){return e.childNodes[1].firstChild.offsetWidth==210}},{identity:"IncludePaddingInHeightCalculation",fn:function(d,e){return e.childNodes[1].firstChild.offsetHeight==210}},{identity:"ArraySort",fn:function(){var d=[1,2,3,4,5].sort(function(){return 0});return d[0]===1&&d[1]===2&&d[2]===3&&d[3]===4&&d[4]===5}},{identity:"Range",fn:function(){return !!document.createRange}},{identity:"CreateContextualFragment",fn:function(){var d=Ext.supports.Range?document.createRange():false;return d&&!!d.createContextualFragment}},{identity:"WindowOnError",fn:function(){return Ext.isIE||Ext.isGecko||Ext.webKitVersion>=534.16}},{identity:"TextAreaMaxLength",fn:function(){var d=document.createElement("textarea");return("maxlength" in d)}},{identity:"GetPositionPercentage",fn:function(d,e){return a(e.childNodes[2],"left")=="10%"}},{identity:"PercentageHeightOverflowBug",fn:function(h){var d=false,g,e;if(Ext.getScrollbarSize().height){e=h.createElement("div");g=e.style;g.height="50px";g.width="50px";g.overflow="auto";g.position="absolute";e.innerHTML=['<div style="display:table;height:100%;">','<div style="width:51px;"></div>',"</div>"].join("");h.body.appendChild(e);if(e.firstChild.offsetHeight===50){d=true}h.body.removeChild(e)}return d}},{identity:"xOriginBug",fn:function(h,i){i.innerHTML='<div id="b1" style="height:100px;width:100px;direction:rtl;position:relative;overflow:scroll"><div id="b2" style="position:relative;width:100%;height:20px;"></div><div id="b3" style="position:absolute;width:20px;height:20px;top:0px;right:0px"></div></div>';var g=document.getElementById("b1").getBoundingClientRect(),e=document.getElementById("b2").getBoundingClientRect(),d=document.getElementById("b3").getBoundingClientRect();return(e.left!==g.left&&d.right!==g.right)}}]}}());Ext.supports.init();Ext.util.DelayedTask=function(e,d,b,h){var g=this,i,a,c=function(){clearInterval(i);i=null;e.apply(d,b||[]);Ext.EventManager.idleEvent.fire()};h=typeof h==="boolean"?h:true;g.delay=function(k,m,l,j){if(h){g.cancel()}a=k||a,e=m||e;d=l||d;b=j||b;if(!i){i=setInterval(c,a)}};g.cancel=function(){if(i){clearInterval(i);i=null}}};Ext.define("Ext.util.Event",function(){var d=Array.prototype.slice,a=Ext.Array.insert,b=Ext.Array.toArray,c=Ext.util.DelayedTask;return{isEvent:true,suspended:0,noOptions:{},constructor:function(g,e){this.name=e;this.observable=g;this.listeners=[]},addListener:function(p,r,t){var n=this,o,j,q,e,s,m,h,l,k,g;r=r||n.observable;if(!n.isListening(p,r)){j=n.createListener(p,r,t);if(n.firing){n.listeners=n.listeners.slice(0)}o=n.listeners;l=h=o.length;q=t&&t.priority;s=n._highestNegativePriorityIndex;m=(s!==undefined);if(q){e=(q<0);if(!e||m){for(k=(e?s:0);k<h;k++){g=o[k].o?o[k].o.priority||0:0;if(g<q){l=k;break}}}else{n._highestNegativePriorityIndex=l}}else{if(m){l=s}}if(!e&&l<=s){n._highestNegativePriorityIndex++}if(l===h){n.listeners[h]=j}else{a(n.listeners,l,[j])}}},createListener:function(h,g,k){g=g||this.observable;var i=this,j={fn:h,scope:g,ev:i},e=h;if(k){j.o=k;if(k.single){e=i.createSingle(e,j,k,g)}if(k.target){e=i.createTargeted(e,j,k,g)}if(k.delay){e=i.createDelayed(e,j,k,g)}if(k.buffer){e=i.createBuffered(e,j,k,g)}}j.fireFn=e;return j},findListener:function(k,j){var h=this.listeners,e=h.length,l,g;while(e--){l=h[e];if(l){g=l.scope;if(l.fn==k&&(g==(j||this.observable))){return e}}}return -1},isListening:function(g,e){return this.findListener(g,e)!==-1},removeListener:function(i,h){var j=this,g,m,l,e;g=j.findListener(i,h);if(g!=-1){m=j.listeners[g];l=j._highestNegativePriorityIndex;if(j.firing){j.listeners=j.listeners.slice(0)}if(m.task){m.task.cancel();delete m.task}e=m.tasks&&m.tasks.length;if(e){while(e--){m.tasks[e].cancel()}delete m.tasks}j.listeners.splice(g,1);if(l){if(g<l){j._highestNegativePriorityIndex--}else{if(g===l&&g===j.listeners.length){delete j._highestNegativePriorityIndex}}}return true}return false},clearListeners:function(){var g=this.listeners,e=g.length;while(e--){this.removeListener(g[e].fn,g[e].scope)}},suspend:function(){this.suspended+=1},resume:function(){if(this.suspended){this.suspended--}},fire:function(){var l=this,j=l.listeners,k=j.length,h,g,m,e;if(!l.suspended&&k>0){l.firing=true;g=arguments.length?d.call(arguments,0):[];e=g.length;for(h=0;h<k;h++){m=j[h];if(m.o){g[e]=m.o}if(m&&m.fireFn.apply(m.scope||l.observable,g)===false){return(l.firing=false)}}}l.firing=false;return true},createTargeted:function(g,h,i,e){return function(){if(i.target===arguments[0]){g.apply(e,arguments)}}},createBuffered:function(g,h,i,e){h.task=new c();return function(){h.task.delay(i.buffer,g,e,b(arguments))}},createDelayed:function(g,h,i,e){return function(){var j=new c();if(!h.tasks){h.tasks=[]}h.tasks.push(j);j.delay(i.delay||10,g,e,b(arguments))}},createSingle:function(g,h,i,e){return function(){var j=h.ev;if(j.removeListener(h.fn,e)&&j.observable){j.observable.hasListeners[j.name]--}return g.apply(e,arguments)}}}});Ext.EventManager=new function(){var a=this,g=document,e=window,d=/\\/g,b=Ext.baseCSSPrefix,h,c=function(){var n=g.body||g.getElementsByTagName("body")[0],j=[b+"body"],i=[],k=Ext.supports.CSS3LinearGradient,m=Ext.supports.CSS3BorderRadius,l;if(!n){return false}l=n.parentNode;function o(p){j.push(b+p)}if(Ext.isIE&&Ext.isIE9m){o("ie");if(Ext.isIE6){o("ie6")}else{o("ie7p");if(Ext.isIE7){o("ie7")}else{o("ie8p");if(Ext.isIE8){o("ie8")}else{o("ie9p");if(Ext.isIE9){o("ie9")}}}}if(Ext.isIE7m){o("ie7m")}if(Ext.isIE8m){o("ie8m")}if(Ext.isIE9m){o("ie9m")}if(Ext.isIE7||Ext.isIE8){o("ie78")}}if(Ext.isIE10){o("ie10")}if(Ext.isGecko){o("gecko");if(Ext.isGecko3){o("gecko3")}if(Ext.isGecko4){o("gecko4")}if(Ext.isGecko5){o("gecko5")}}if(Ext.isOpera){o("opera")}if(Ext.isWebKit){o("webkit")}if(Ext.isSafari){o("safari");if(Ext.isSafari2){o("safari2")}if(Ext.isSafari3){o("safari3")}if(Ext.isSafari4){o("safari4")}if(Ext.isSafari5){o("safari5")}if(Ext.isSafari5_0){o("safari5_0")}}if(Ext.isChrome){o("chrome")}if(Ext.isMac){o("mac")}if(Ext.isLinux){o("linux")}if(!m){o("nbr")}if(!k){o("nlg")}if(l){if(Ext.isStrict&&(Ext.isIE6||Ext.isIE7)){Ext.isBorderBox=false}else{Ext.isBorderBox=true}if(Ext.isBorderBox){i.push(b+"border-box")}if(Ext.isStrict){i.push(b+"strict")}else{i.push(b+"quirks")}Ext.fly(l,"_internal").addCls(i)}Ext.fly(n,"_internal").addCls(j);return true};Ext.apply(a,{hasBoundOnReady:false,hasFiredReady:false,deferReadyEvent:1,onReadyChain:[],readyEvent:(function(){h=new Ext.util.Event();h.fire=function(){Ext._beforeReadyTime=Ext._beforeReadyTime||new Date().getTime();h.self.prototype.fire.apply(h,arguments);Ext._afterReadytime=new Date().getTime()};return h}()),idleEvent:new Ext.util.Event(),isReadyPaused:function(){return(/[?&]ext-pauseReadyFire\b/i.test(location.search)&&!Ext._continueFireReady)},bindReadyEvent:function(){if(a.hasBoundOnReady){return}if(g.readyState=="complete"){a.onReadyEvent({type:g.readyState||"body"})}else{g.addEventListener("DOMContentLoaded",a.onReadyEvent,false);e.addEventListener("load",a.onReadyEvent,false);a.hasBoundOnReady=true}},onReadyEvent:function(i){if(i&&i.type){a.onReadyChain.push(i.type)}if(a.hasBoundOnReady){g.removeEventListener("DOMContentLoaded",a.onReadyEvent,false);e.removeEventListener("load",a.onReadyEvent,false)}if(!Ext.isReady){a.fireDocReady()}},fireDocReady:function(){if(!Ext.isReady){Ext._readyTime=new Date().getTime();Ext.isReady=true;Ext.supports.init();a.onWindowUnload();h.onReadyChain=a.onReadyChain;if(Ext.isNumber(a.deferReadyEvent)){Ext.Function.defer(a.fireReadyEvent,a.deferReadyEvent);a.hasDocReadyTimer=true}else{a.fireReadyEvent()}}},fireReadyEvent:function(){a.hasDocReadyTimer=false;a.isFiring=true;while(h.listeners.length&&!a.isReadyPaused()){h.fire()}a.isFiring=false;a.hasFiredReady=true;Ext.EventManager.idleEvent.fire()},onDocumentReady:function(k,j,i){i=i||{};i.single=true;h.addListener(k,j,i);if(!(a.isFiring||a.hasDocReadyTimer)){if(Ext.isReady){a.fireReadyEvent()}else{a.bindReadyEvent()}}},stoppedMouseDownEvent:new Ext.util.Event(),propRe:/^(?:scope|delay|buffer|single|stopEvent|preventDefault|stopPropagation|normalized|args|delegate|freezeEvent)$/,getId:function(i){var j;i=Ext.getDom(i);if(i===g||i===e){j=i===g?Ext.documentId:Ext.windowId}else{j=Ext.id(i)}if(!Ext.cache[j]){Ext.addCacheEntry(j,null,i)}return j},prepareListenerConfig:function(l,j,n){var o=a.propRe,k,m,i;for(k in j){if(j.hasOwnProperty(k)){if(!o.test(k)){m=j[k];if(typeof m=="function"){i=[l,k,m,j.scope,j]}else{i=[l,k,m.fn,m.scope,m]}if(n){a.removeListener.apply(a,i)}else{a.addListener.apply(a,i)}}}}},mouseEnterLeaveRe:/mouseenter|mouseleave/,normalizeEvent:function(i,j){if(a.mouseEnterLeaveRe.test(i)&&!Ext.supports.MouseEnterLeave){if(j){j=Ext.Function.createInterceptor(j,a.contains)}i=i=="mouseenter"?"mouseover":"mouseout"}else{if(i=="mousewheel"&&!Ext.supports.MouseWheel&&!Ext.isOpera){i="DOMMouseScroll"}}return{eventName:i,fn:j}},contains:function(j){j=j.browserEvent||j;var i=j.currentTarget,k=a.getRelatedTarget(j);if(i&&i.firstChild){while(k){if(k===i){return false}k=k.parentNode;if(k&&(k.nodeType!=1)){k=null}}}return true},addListener:function(m,o,q,r,s){if(typeof o!=="string"){a.prepareListenerConfig(m,o);return}var l=m.dom||Ext.getDom(m),p,k,i,j,n;s=s||{};p=a.normalizeEvent(o,q);k=a.createListenerWrap(l,o,p.fn,r,s);i=a.getEventListenerCache(m.dom?m:l,o);o=p.eventName;if(l.attachEvent){j=a.normalizeId(l);if(j){n=Ext.cache[j][o];if(n&&n.firing){i=a.cloneEventListenerCache(l,o)}}}i.push({fn:q,wrap:k,scope:r});if(l.attachEvent){if(i.length===1){j=a.normalizeId(l,true);q=Ext.Function.bind(a.handleSingleEvent,a,[j,o],true);Ext.cache[j][o]={firing:false,fn:q};l.attachEvent("on"+o,q)}}else{l.addEventListener(o,k,s.capture||false)}if(l==g&&o=="mousedown"){a.stoppedMouseDownEvent.addListener(k)}},normalizeId:function(j,i){var k;if(j===document){k=Ext.documentId}else{if(j===window){k=Ext.windowId}else{k=j.id}}if(!k&&i){k=a.getId(j)}return k},handleSingleEvent:function(o,p,l){var m=a.getEventListenerCache(p,l),k=Ext.cache[p][l],j,n;if(k.firing){return}k.firing=true;for(n=0,j=m.length;n<j;++n){m[n].wrap(o)}k.firing=false},removeListener:function(s,u,v,x){if(typeof u!=="string"){a.prepareListenerConfig(s,u,true);return}var q=Ext.getDom(s),m,n=s.dom?s:Ext.get(q),k=a.getEventListenerCache(n,u),w=a.normalizeEvent(u).eventName,r=k.length,p,t,o,l;while(r--){o=k[r];if(o&&(!v||o.fn==v)&&(!x||o.scope===x)){l=o.wrap;if(l.task){clearTimeout(l.task);delete l.task}p=l.tasks&&l.tasks.length;if(p){while(p--){clearTimeout(l.tasks[p])}delete l.tasks}if(q.detachEvent){m=a.normalizeId(q,true);t=Ext.cache[m][w];if(t&&t.firing){k=a.cloneEventListenerCache(q,w)}if(k.length===1){v=t.fn;delete Ext.cache[m][w];q.detachEvent("on"+w,v)}}else{q.removeEventListener(w,l,false)}if(l&&q==g&&u=="mousedown"){a.stoppedMouseDownEvent.removeListener(l)}Ext.Array.erase(k,r,1)}}},removeAll:function(l){var m=(typeof l==="string")?l:l.id,j,k,i;if(m&&(j=Ext.cache[m])){k=j.events;for(i in k){if(k.hasOwnProperty(i)){a.removeListener(l,i)}}j.events={}}},purgeElement:function(m,k){var o=Ext.getDom(m),l=0,j,n;if(k){a.removeListener(m,k)}else{a.removeAll(m)}if(o&&o.childNodes){n=o.childNodes;for(j=n.length;l<j;l++){a.purgeElement(n[l],k)}}},createListenerWrap:function(p,j,m,l,i){i=i||{};var n,o,k=function(r,q){if(!o){n=["if(!"+Ext.name+") {return;}"];if(i.buffer||i.delay||i.freezeEvent){if(i.freezeEvent){n.push("e = X.EventObject.setEvent(e);")}n.push("e = new X.EventObjectImpl(e, "+(i.freezeEvent?"true":"false")+");")}else{n.push("e = X.EventObject.setEvent(e);")}if(i.delegate){n.push('var result, t = e.getTarget("'+(i.delegate+"").replace(d,"\\\\")+'", this);');n.push("if(!t) {return;}")}else{n.push("var t = e.target, result;")}if(i.target){n.push("if(e.target !== options.target) {return;}")}if(i.stopEvent){n.push("e.stopEvent();")}else{if(i.preventDefault){n.push("e.preventDefault();")}if(i.stopPropagation){n.push("e.stopPropagation();")}}if(i.normalized===false){n.push("e = e.browserEvent;")}if(i.buffer){n.push("(wrap.task && clearTimeout(wrap.task));");n.push("wrap.task = setTimeout(function() {")}if(i.delay){n.push("wrap.tasks = wrap.tasks || [];");n.push("wrap.tasks.push(setTimeout(function() {")}n.push("result = fn.call(scope || dom, e, t, options);");if(i.single){n.push("evtMgr.removeListener(dom, ename, fn, scope);")}if(j!=="mousemove"&&j!=="unload"){n.push("if (evtMgr.idleEvent.listeners.length) {");n.push("evtMgr.idleEvent.fire();");n.push("}")}if(i.delay){n.push("}, "+i.delay+"));")}if(i.buffer){n.push("}, "+i.buffer+");")}n.push("return result;");o=Ext.cacheableFunctionFactory("e","options","fn","scope","ename","dom","wrap","args","X","evtMgr",n.join("\n"))}return o.call(p,r,i,m,l,j,p,k,q,Ext,a)};return k},getEventCache:function(k){var j,i,l;if(!k){return[]}if(k.$cache){j=k.$cache}else{if(typeof k==="string"){l=k}else{l=a.getId(k)}j=Ext.cache[l]}i=j.events||(j.events={});return i},getEventListenerCache:function(k,i){var j=a.getEventCache(k);return j[i]||(j[i]=[])},cloneEventListenerCache:function(l,i){var k=a.getEventCache(l),j;if(k[i]){j=k[i].slice(0)}else{j=[]}k[i]=j;return j},mouseLeaveRe:/(mouseout|mouseleave)/,mouseEnterRe:/(mouseover|mouseenter)/,stopEvent:function(i){a.stopPropagation(i);a.preventDefault(i)},stopPropagation:function(i){i=i.browserEvent||i;if(i.stopPropagation){i.stopPropagation()}else{i.cancelBubble=true}},preventDefault:function(i){i=i.browserEvent||i;if(i.preventDefault){i.preventDefault()}else{i.returnValue=false;try{if(i.ctrlKey||i.keyCode>111&&i.keyCode<124){i.keyCode=-1}}catch(j){}}},getRelatedTarget:function(i){i=i.browserEvent||i;var j=i.relatedTarget;if(!j){if(a.mouseLeaveRe.test(i.type)){j=i.toElement}else{if(a.mouseEnterRe.test(i.type)){j=i.fromElement}}}return a.resolveTextNode(j)},getPageX:function(i){return a.getPageXY(i)[0]},getPageY:function(i){return a.getPageXY(i)[1]},getPageXY:function(k){k=k.browserEvent||k;var j=k.pageX,m=k.pageY,l=g.documentElement,i=g.body;if(!j&&j!==0){j=k.clientX+(l&&l.scrollLeft||i&&i.scrollLeft||0)-(l&&l.clientLeft||i&&i.clientLeft||0);m=k.clientY+(l&&l.scrollTop||i&&i.scrollTop||0)-(l&&l.clientTop||i&&i.clientTop||0)}return[j,m]},getTarget:function(i){i=i.browserEvent||i;return a.resolveTextNode(i.target||i.srcElement)},resolveTextNode:Ext.isGecko?function(j){if(j){var i=HTMLElement.prototype.toString.call(j);if(i!=="[xpconnect wrapped native prototype]"&&i!=="[object XULElement]"){return j.nodeType==3?j.parentNode:j}}}:function(i){return i&&i.nodeType==3?i.parentNode:i},curWidth:0,curHeight:0,onWindowResize:function(l,k,j){var i=a.resizeEvent;if(!i){a.resizeEvent=i=new Ext.util.Event();a.on(e,"resize",a.fireResize,null,{buffer:100})}i.addListener(l,k,j)},fireResize:function(){var i=Ext.Element.getViewWidth(),j=Ext.Element.getViewHeight();if(a.curHeight!=j||a.curWidth!=i){a.curHeight=j;a.curWidth=i;a.resizeEvent.fire(i,j)}},removeResizeListener:function(k,j){var i=a.resizeEvent;if(i){i.removeListener(k,j)}},onWindowUnload:function(l,k,j){var i=a.unloadEvent;if(!i){a.unloadEvent=i=new Ext.util.Event();a.addListener(e,"unload",a.fireUnload)}if(l){i.addListener(l,k,j)}},fireUnload:function(){try{g=e=undefined;var o,k,m,l,j;a.unloadEvent.fire();if(Ext.isGecko3){o=Ext.ComponentQuery.query("gridview");k=0;m=o.length;for(;k<m;k++){o[k].scrollToTop()}}j=Ext.cache;for(l in j){if(j.hasOwnProperty(l)){a.removeAll(l)}}}catch(n){}},removeUnloadListener:function(k,j){var i=a.unloadEvent;if(i){i.removeListener(k,j)}},useKeyDown:Ext.isWebKit?parseInt(navigator.userAgent.match(/AppleWebKit\/(\d+)/)[1],10)>=525:!((Ext.isGecko&&!Ext.isWindows)||Ext.isOpera),getKeyEvent:function(){return a.useKeyDown?"keydown":"keypress"}});if(!("addEventListener" in document)&&document.attachEvent){Ext.apply(a,{pollScroll:function(){var i=true;try{document.documentElement.doScroll("left")}catch(j){i=false}if(i&&document.body){a.onReadyEvent({type:"doScroll"})}else{a.scrollTimeout=setTimeout(a.pollScroll,20)}return i},scrollTimeout:null,readyStatesRe:/complete/i,checkReadyState:function(){var i=document.readyState;if(a.readyStatesRe.test(i)){a.onReadyEvent({type:i})}},bindReadyEvent:function(){var i=true;if(a.hasBoundOnReady){return}try{i=window.frameElement===undefined}catch(j){i=false}if(!i||!g.documentElement.doScroll){a.pollScroll=Ext.emptyFn}if(a.pollScroll()===true){return}if(g.readyState=="complete"){a.onReadyEvent({type:"already "+(g.readyState||"body")})}else{g.attachEvent("onreadystatechange",a.checkReadyState);window.attachEvent("onload",a.onReadyEvent);a.hasBoundOnReady=true}},onReadyEvent:function(i){if(i&&i.type){a.onReadyChain.push(i.type)}if(a.hasBoundOnReady){document.detachEvent("onreadystatechange",a.checkReadyState);window.detachEvent("onload",a.onReadyEvent)}if(Ext.isNumber(a.scrollTimeout)){clearTimeout(a.scrollTimeout);delete a.scrollTimeout}if(!Ext.isReady){a.fireDocReady()}},onReadyChain:[]})}Ext.onReady=function(k,j,i){Ext.Loader.onReady(k,j,true,i)};Ext.onDocumentReady=a.onDocumentReady;a.on=a.addListener;a.un=a.removeListener;Ext.onReady(c)};Ext.define("Ext.util.Observable",function(a){var d=[],e=Array.prototype,g=e.slice,c=Ext.util.Event,b=function(h){if(h instanceof b){return h}this.observable=h;if(arguments[1].isObservable){this.managedListeners=true}this.args=g.call(arguments,1)};b.prototype.destroy=function(){this.observable[this.managedListeners?"mun":"un"].apply(this.observable,this.args)};return{statics:{releaseCapture:function(h){h.fireEvent=this.prototype.fireEvent},capture:function(j,i,h){j.fireEvent=Ext.Function.createInterceptor(j.fireEvent,i,h)},observe:function(h,i){if(h){if(!h.isObservable){Ext.applyIf(h,new this());this.capture(h.prototype,h.fireEvent,h)}if(Ext.isObject(i)){h.on(i)}}return h},prepareClass:function(j,i){if(!j.HasListeners){var k=function(){},h=j.superclass.HasListeners||(i&&i.HasListeners)||a.HasListeners;j.prototype.HasListeners=j.HasListeners=k;k.prototype=j.hasListeners=new h()}}},isObservable:true,eventsSuspended:0,constructor:function(h){var i=this;Ext.apply(i,h);if(!i.hasListeners){i.hasListeners=new i.HasListeners()}i.events=i.events||{};if(i.listeners){i.on(i.listeners);i.listeners=null}if(i.bubbleEvents){i.enableBubble(i.bubbleEvents)}},onClassExtended:function(h){if(!h.HasListeners){a.prepareClass(h)}},eventOptionsRe:/^(?:scope|delay|buffer|single|stopEvent|preventDefault|stopPropagation|normalized|args|delegate|element|destroyable|vertical|horizontal|freezeEvent|priority)$/,addManagedListener:function(o,k,m,p,q,j){var l=this,n=l.managedListeners=l.managedListeners||[],i,h;if(typeof k!=="string"){h=arguments.length>4?q:k;q=k;for(k in q){if(q.hasOwnProperty(k)){i=q[k];if(!l.eventOptionsRe.test(k)){l.addManagedListener(o,k,i.fn||i,i.scope||q.scope||p,i.fn?i:h,true)}}}if(q&&q.destroyable){return new b(l,o,q)}}else{if(typeof m==="string"){p=p||l;m=p[m]}n.push({item:o,ename:k,fn:m,scope:p,options:q});o.on(k,m,p,q);if(!j&&q&&q.destroyable){return new b(l,o,k,m,p)}}},removeManagedListener:function(p,k,n,q){var m=this,r,j,o,h,l;if(typeof k!=="string"){r=k;for(k in r){if(r.hasOwnProperty(k)){j=r[k];if(!m.eventOptionsRe.test(k)){m.removeManagedListener(p,k,j.fn||j,j.scope||r.scope||q)}}}}else{o=m.managedListeners?m.managedListeners.slice():[];for(l=0,h=o.length;l<h;l++){m.removeManagedListenerItem(false,o[l],p,k,n,q)}}},fireEvent:function(h){return this.fireEventArgs(h,Array.prototype.slice.call(arguments,1))},fireEventArgs:function(h,j){h=h.toLowerCase();var m=this,k=m.events,l=k&&k[h],i=true;if(l&&m.hasListeners[h]){i=m.continueFireEvent(h,j||d,l.bubble)}return i},continueFireEvent:function(j,l,i){var n=this,h,m,k=true;do{if(n.eventsSuspended){if((h=n.eventQueue)){h.push([j,l,i])}return k}else{m=n.events[j];if(m&&m!=true){if((k=m.fire.apply(m,l))===false){break}}}}while(i&&(n=n.getBubbleParent()));return k},getBubbleParent:function(){var i=this,h=i.getBubbleTarget&&i.getBubbleTarget();if(h&&h.isObservable){return h}return null},addListener:function(k,m,l,j){var o=this,i,n,h=0;if(typeof k!=="string"){j=k;for(k in j){if(j.hasOwnProperty(k)){i=j[k];if(!o.eventOptionsRe.test(k)){o.addListener(k,i.fn||i,i.scope||j.scope,i.fn?i:j)}}}if(j&&j.destroyable){return new b(o,j)}}else{k=k.toLowerCase();n=o.events[k];if(n&&n.isEvent){h=n.listeners.length}else{o.events[k]=n=new c(o,k)}if(typeof m==="string"){l=l||o;m=l[m]}n.addListener(m,l,j);if(n.listeners.length!==h){o.hasListeners._incr_(k)}if(j&&j.destroyable){return new b(o,k,m,l,j)}}},removeListener:function(j,l,k){var n=this,i,m,h;if(typeof j!=="string"){h=j;for(j in h){if(h.hasOwnProperty(j)){i=h[j];if(!n.eventOptionsRe.test(j)){n.removeListener(j,i.fn||i,i.scope||h.scope)}}}}else{j=j.toLowerCase();m=n.events[j];if(m&&m.isEvent){if(m.removeListener(l,k)){n.hasListeners._decr_(j)}}}},clearListeners:function(){var j=this.events,h=this.hasListeners,k,i;for(i in j){if(j.hasOwnProperty(i)){k=j[i];if(k.isEvent){delete h[i];k.clearListeners()}}}this.clearManagedListeners()},clearManagedListeners:function(){var j=this.managedListeners||[],k=0,h=j.length;for(;k<h;k++){this.removeManagedListenerItem(true,j[k])}this.managedListeners=[]},removeManagedListenerItem:function(i,h,m,j,l,k){if(i||(h.item===m&&h.ename===j&&(!l||h.fn===l)&&(!k||h.scope===k))){h.item.un(h.ename,h.fn,h.scope);if(!i){Ext.Array.remove(this.managedListeners,h)}}},addEvents:function(n){var m=this,l=m.events||(m.events={}),h,j,k;if(typeof n=="string"){for(j=arguments,k=j.length;k--;){h=j[k];if(!l[h]){l[h]=true}}}else{Ext.applyIf(m.events,n)}},hasListener:function(h){return !!this.hasListeners[h.toLowerCase()]},suspendEvents:function(h){this.eventsSuspended+=1;if(h&&!this.eventQueue){this.eventQueue=[]}},suspendEvent:function(j){var h=arguments.length,k,l;for(k=0;k<h;k++){l=this.events[arguments[k]];if(l&&l.suspend){l.suspend()}}},resumeEvent:function(){var h=arguments.length,j,k;for(j=0;j<h;j++){k=this.events[arguments[j]];if(k&&k.resume){k.resume()}}},resumeEvents:function(){var h=this,k=h.eventQueue,j,i;if(h.eventsSuspended&&!--h.eventsSuspended){delete h.eventQueue;if(k){j=k.length;for(i=0;i<j;i++){h.continueFireEvent.apply(h,k[i])}}}},relayEvents:function(j,l,o){var n=this,h=l.length,k=0,m,p={};for(;k<h;k++){m=l[k];p[m]=n.createRelayer(o?o+m:m)}n.mon(j,p,null,null,undefined);return new b(n,j,p)},createRelayer:function(h,i){var j=this;return function(){return j.fireEventArgs.call(j,h,i?Array.prototype.slice.apply(arguments,i):arguments)}},enableBubble:function(p){if(p){var n=this,o=(typeof p=="string")?arguments:p,m=o.length,k=n.events,j,l,h;for(h=0;h<m;++h){j=o[h].toLowerCase();l=k[j];if(!l||typeof l=="boolean"){k[j]=l=new c(n,j)}n.hasListeners._incr_(j);l.bubble=true}}}}},function(){var b=this,e=b.prototype,c=function(){},g=function(h){if(!h.HasListeners){var i=h.prototype;b.prepareClass(h,this);h.onExtended(function(j){b.prepareClass(j)});if(i.onClassMixedIn){Ext.override(h,{onClassMixedIn:function(j){g.call(this,j);this.callParent(arguments)}})}else{i.onClassMixedIn=function(j){g.call(this,j)}}}},a;c.prototype={_decr_:function(h){if(!--this[h]){delete this[h]}},_incr_:function(h){if(this.hasOwnProperty(h)){++this[h]}else{this[h]=1}}};e.HasListeners=b.HasListeners=c;b.createAlias({on:"addListener",un:"removeListener",mon:"addManagedListener",mun:"removeManagedListener"});b.observeClass=b.observe;Ext.globalEvents=a=new b({events:{idle:Ext.EventManager.idleEvent,ready:Ext.EventManager.readyEvent}});Ext.on=function(){return a.addListener.apply(a,arguments)};Ext.un=function(){return a.removeListener.apply(a,arguments)};function d(n){var m=(this.methodEvents=this.methodEvents||{})[n],j,i,k,l=this,h;if(!m){this.methodEvents[n]=m={};m.originalFn=this[n];m.methodName=n;m.before=[];m.after=[];h=function(q,p,o){if((i=q.apply(p||l,o))!==undefined){if(typeof i=="object"){if(i.returnValue!==undefined){j=i.returnValue}else{j=i}k=!!i.cancel}else{if(i===false){k=true}else{j=i}}}};this[n]=function(){var q=Array.prototype.slice.call(arguments,0),p,r,o;j=i=undefined;k=false;for(r=0,o=m.before.length;r<o;r++){p=m.before[r];h(p.fn,p.scope,q);if(k){return j}}if((i=m.originalFn.apply(l,q))!==undefined){j=i}for(r=0,o=m.after.length;r<o;r++){p=m.after[r];h(p.fn,p.scope,q);if(k){return j}}return j}}return m}Ext.apply(e,{onClassMixedIn:g,beforeMethod:function(j,i,h){d.call(this,j).before.push({fn:i,scope:h})},afterMethod:function(j,i,h){d.call(this,j).after.push({fn:i,scope:h})},removeMethodListener:function(n,l,k){var m=this.getMethodEvent(n),j,h;for(j=0,h=m.before.length;j<h;j++){if(m.before[j].fn==l&&m.before[j].scope==k){Ext.Array.erase(m.before,j,1);return}}for(j=0,h=m.after.length;j<h;j++){if(m.after[j].fn==l&&m.after[j].scope==k){Ext.Array.erase(m.after,j,1);return}}},toggleEventLogging:function(h){Ext.util.Observable[h?"capture":"releaseCapture"](this,function(i){if(Ext.isDefined(Ext.global.console)){Ext.global.console.log(i,arguments)}})}})});Ext.define("Ext.EventObjectImpl",{BACKSPACE:8,TAB:9,NUM_CENTER:12,ENTER:13,RETURN:13,SHIFT:16,CTRL:17,ALT:18,PAUSE:19,CAPS_LOCK:20,ESC:27,SPACE:32,PAGE_UP:33,PAGE_DOWN:34,END:35,HOME:36,LEFT:37,UP:38,RIGHT:39,DOWN:40,PRINT_SCREEN:44,INSERT:45,DELETE:46,ZERO:48,ONE:49,TWO:50,THREE:51,FOUR:52,FIVE:53,SIX:54,SEVEN:55,EIGHT:56,NINE:57,A:65,B:66,C:67,D:68,E:69,F:70,G:71,H:72,I:73,J:74,K:75,L:76,M:77,N:78,O:79,P:80,Q:81,R:82,S:83,T:84,U:85,V:86,W:87,X:88,Y:89,Z:90,CONTEXT_MENU:93,NUM_ZERO:96,NUM_ONE:97,NUM_TWO:98,NUM_THREE:99,NUM_FOUR:100,NUM_FIVE:101,NUM_SIX:102,NUM_SEVEN:103,NUM_EIGHT:104,NUM_NINE:105,NUM_MULTIPLY:106,NUM_PLUS:107,NUM_MINUS:109,NUM_PERIOD:110,NUM_DIVISION:111,F1:112,F2:113,F3:114,F4:115,F5:116,F6:117,F7:118,F8:119,F9:120,F10:121,F11:122,F12:123,WHEEL_SCALE:(function(){var a;if(Ext.isGecko){a=3}else{if(Ext.isMac){if(Ext.isSafari&&Ext.webKitVersion>=532){a=120}else{a=12}a*=3}else{a=120}}return a}()),clickRe:/(dbl)?click/,safariKeys:{3:13,63234:37,63235:39,63232:38,63233:40,63276:33,63277:34,63272:46,63273:36,63275:35},btnMap:Ext.isIE?{1:0,4:1,2:2}:{0:0,1:1,2:2},constructor:function(a,b){if(a){this.setEvent(a.browserEvent||a,b)}},setEvent:function(d,e){var c=this,b,a;if(d===c||(d&&d.browserEvent)){return d}c.browserEvent=d;if(d){b=d.button?c.btnMap[d.button]:(d.which?d.which-1:-1);if(c.clickRe.test(d.type)&&b==-1){b=0}a={type:d.type,button:b,shiftKey:d.shiftKey,ctrlKey:d.ctrlKey||d.metaKey||false,altKey:d.altKey,keyCode:d.keyCode,charCode:d.charCode,target:Ext.EventManager.getTarget(d),relatedTarget:Ext.EventManager.getRelatedTarget(d),currentTarget:d.currentTarget,xy:(e?c.getXY():null)}}else{a={button:-1,shiftKey:false,ctrlKey:false,altKey:false,keyCode:0,charCode:0,target:null,xy:[0,0]}}Ext.apply(c,a);return c},stopEvent:function(){this.stopPropagation();this.preventDefault()},preventDefault:function(){if(this.browserEvent){Ext.EventManager.preventDefault(this.browserEvent)}},stopPropagation:function(){var a=this.browserEvent;if(a){if(a.type=="mousedown"){Ext.EventManager.stoppedMouseDownEvent.fire(this)}Ext.EventManager.stopPropagation(a)}},getCharCode:function(){return this.charCode||this.keyCode},getKey:function(){return this.normalizeKey(this.keyCode||this.charCode)},normalizeKey:function(a){return Ext.isWebKit?(this.safariKeys[a]||a):a},getPageX:function(){return this.getX()},getPageY:function(){return this.getY()},getX:function(){return this.getXY()[0]},getY:function(){return this.getXY()[1]},getXY:function(){if(!this.xy){this.xy=Ext.EventManager.getPageXY(this.browserEvent)}return this.xy},getTarget:function(b,c,a){if(b){return Ext.fly(this.target).findParent(b,c,a)}return a?Ext.get(this.target):this.target},getRelatedTarget:function(b,c,a){if(b&&this.relatedTarget){return Ext.fly(this.relatedTarget).findParent(b,c,a)}return a?Ext.get(this.relatedTarget):this.relatedTarget},correctWheelDelta:function(c){var b=this.WHEEL_SCALE,a=Math.round(c/b);if(!a&&c){a=(c<0)?-1:1}return a},getWheelDeltas:function(){var d=this,c=d.browserEvent,b=0,a=0;if(Ext.isDefined(c.wheelDeltaX)){b=c.wheelDeltaX;a=c.wheelDeltaY}else{if(c.wheelDelta){a=c.wheelDelta}else{if(c.detail){a=-c.detail;if(a>100){a=3}else{if(a<-100){a=-3}}if(Ext.isDefined(c.axis)&&c.axis===c.HORIZONTAL_AXIS){b=a;a=0}}}}return{x:d.correctWheelDelta(b),y:d.correctWheelDelta(a)}},getWheelDelta:function(){var a=this.getWheelDeltas();return a.y},within:function(d,e,b){if(d){var c=e?this.getRelatedTarget():this.getTarget(),a;if(c){a=Ext.fly(d).contains(c);if(!a&&b){a=c==Ext.getDom(d)}return a}}return false},isNavKeyPress:function(){var b=this,a=this.normalizeKey(b.keyCode);return(a>=33&&a<=40)||a==b.RETURN||a==b.TAB||a==b.ESC},isSpecialKey:function(){var a=this.normalizeKey(this.keyCode);return(this.type=="keypress"&&this.ctrlKey)||this.isNavKeyPress()||(a==this.BACKSPACE)||(a>=16&&a<=20)||(a>=44&&a<=46)},getPoint:function(){var a=this.getXY();return new Ext.util.Point(a[0],a[1])},hasModifier:function(){return this.ctrlKey||this.altKey||this.shiftKey||this.metaKey},injectEvent:(function(){var d,e={},c;if(!Ext.isIE&&document.createEvent){d={createHtmlEvent:function(k,i,h,g){var j=k.createEvent("HTMLEvents");j.initEvent(i,h,g);return j},createMouseEvent:function(u,s,m,l,o,k,i,j,g,r,q,n,p){var h=u.createEvent("MouseEvents"),t=u.defaultView||window;if(h.initMouseEvent){h.initMouseEvent(s,m,l,t,o,k,i,k,i,j,g,r,q,n,p)}else{h=u.createEvent("UIEvents");h.initEvent(s,m,l);h.view=t;h.detail=o;h.screenX=k;h.screenY=i;h.clientX=k;h.clientY=i;h.ctrlKey=j;h.altKey=g;h.metaKey=q;h.shiftKey=r;h.button=n;h.relatedTarget=p}return h},createUIEvent:function(m,k,i,h,j){var l=m.createEvent("UIEvents"),g=m.defaultView||window;l.initUIEvent(k,i,h,g,j);return l},fireEvent:function(i,g,h){i.dispatchEvent(h)},fixTarget:function(g){if(g==window&&!g.dispatchEvent){return document}return g}}}else{if(document.createEventObject){c={0:1,1:4,2:2};d={createHtmlEvent:function(k,i,h,g){var j=k.createEventObject();j.bubbles=h;j.cancelable=g;return j},createMouseEvent:function(t,s,m,l,o,k,i,j,g,r,q,n,p){var h=t.createEventObject();h.bubbles=m;h.cancelable=l;h.detail=o;h.screenX=k;h.screenY=i;h.clientX=k;h.clientY=i;h.ctrlKey=j;h.altKey=g;h.shiftKey=r;h.metaKey=q;h.button=c[n]||n;h.relatedTarget=p;return h},createUIEvent:function(l,j,h,g,i){var k=l.createEventObject();k.bubbles=h;k.cancelable=g;return k},fireEvent:function(i,g,h){i.fireEvent("on"+g,h)},fixTarget:function(g){if(g==document){return document.documentElement}return g}}}}Ext.Object.each({load:[false,false],unload:[false,false],select:[true,false],change:[true,false],submit:[true,true],reset:[true,false],resize:[true,false],scroll:[true,false]},function(i,j){var h=j[0],g=j[1];e[i]=function(m,k){var l=d.createHtmlEvent(i,h,g);d.fireEvent(m,i,l)}});function b(i,h){var g=(i!="mousemove");return function(m,j){var l=j.getXY(),k=d.createMouseEvent(m.ownerDocument,i,true,g,h,l[0],l[1],j.ctrlKey,j.altKey,j.shiftKey,j.metaKey,j.button,j.relatedTarget);d.fireEvent(m,i,k)}}Ext.each(["click","dblclick","mousedown","mouseup","mouseover","mousemove","mouseout"],function(g){e[g]=b(g,1)});Ext.Object.each({focusin:[true,false],focusout:[true,false],activate:[true,true],focus:[false,false],blur:[false,false]},function(i,j){var h=j[0],g=j[1];e[i]=function(m,k){var l=d.createUIEvent(m.ownerDocument,i,h,g,1);d.fireEvent(m,i,l)}});if(!d){e={};d={fixTarget:Ext.identityFn}}function a(h,g){}return function(j){var i=this,h=e[i.type]||a,g=j?(j.dom||j):i.getTarget();g=d.fixTarget(g);h(g,i)}}())},function(){Ext.EventObject=new Ext.EventObjectImpl()});Ext.define("Ext.dom.AbstractQuery",{select:function(k,b){var h=[],d,g,e,c,a;b=b||document;if(typeof b=="string"){b=document.getElementById(b)}k=k.split(",");for(g=0,c=k.length;g<c;g++){if(typeof k[g]=="string"){if(typeof k[g][0]=="@"){d=b.getAttributeNode(k[g].substring(1));h.push(d)}else{d=b.querySelectorAll(k[g]);for(e=0,a=d.length;e<a;e++){h.push(d[e])}}}}return h},selectNode:function(b,a){return this.select(b,a)[0]},is:function(a,b){if(typeof a=="string"){a=document.getElementById(a)}return this.select(b).indexOf(a)!==-1}});Ext.define("Ext.dom.AbstractHelper",{emptyTags:/^(?:br|frame|hr|img|input|link|meta|range|spacer|wbr|area|param|col)$/i,confRe:/^(?:tag|children|cn|html|tpl|tplData)$/i,endRe:/end/i,styleSepRe:/\s*(?::|;)\s*/,attributeTransform:{cls:"class",htmlFor:"for"},closeTags:{},decamelizeName:(function(){var c=/([a-z])([A-Z])/g,b={};function a(d,g,e){return g+"-"+e.toLowerCase()}return function(d){return b[d]||(b[d]=d.replace(c,a))}}()),generateMarkup:function(j,b){var h=this,g=typeof j,e,a,k,d,c;if(g=="string"||g=="number"){b.push(j)}else{if(Ext.isArray(j)){for(d=0;d<j.length;d++){if(j[d]){h.generateMarkup(j[d],b)}}}else{k=j.tag||"div";b.push("<",k);for(e in j){if(j.hasOwnProperty(e)){a=j[e];if(!h.confRe.test(e)){if(typeof a=="object"){b.push(" ",e,'="');h.generateStyles(a,b).push('"')}else{b.push(" ",h.attributeTransform[e]||e,'="',a,'"')}}}}if(h.emptyTags.test(k)){b.push("/>")}else{b.push(">");if((a=j.tpl)){a.applyOut(j.tplData,b)}if((a=j.html)){b.push(a)}if((a=j.cn||j.children)){h.generateMarkup(a,b)}c=h.closeTags;b.push(c[k]||(c[k]="</"+k+">"))}}}return b},generateStyles:function(e,c){var b=c||[],d;for(d in e){if(e.hasOwnProperty(d)){b.push(this.decamelizeName(d),":",e[d],";")}}return c||b.join("")},markup:function(a){if(typeof a=="string"){return a}var b=this.generateMarkup(a,[]);return b.join("")},applyStyles:function(c,d){if(d){var b=0,a;c=Ext.fly(c,"_applyStyles");if(typeof d=="function"){d=d.call()}if(typeof d=="string"){d=Ext.util.Format.trim(d).split(this.styleSepRe);for(a=d.length;b<a;){c.setStyle(d[b++],d[b++])}}else{if(Ext.isObject(d)){c.setStyle(d)}}}},insertHtml:function(c,g,d){var h={},a,b,i,e;c=c.toLowerCase();h.beforebegin=["BeforeBegin","previousSibling"];h.afterend=["AfterEnd","nextSibling"];b=g.ownerDocument.createRange();a="setStart"+(this.endRe.test(c)?"After":"Before");if(h[c]){b[a](g);i=b.createContextualFragment(d);g.parentNode.insertBefore(i,c=="beforebegin"?g:g.nextSibling);return g[(c=="beforebegin"?"previous":"next")+"Sibling"]}else{e=(c=="afterbegin"?"first":"last")+"Child";if(g.firstChild){b[a](g[e]);i=b.createContextualFragment(d);if(c=="afterbegin"){g.insertBefore(i,g.firstChild)}else{g.appendChild(i)}}else{g.innerHTML=d}return g[e]}throw'Illegal insertion point -> "'+c+'"'},insertBefore:function(a,c,b){return this.doInsert(a,c,b,"beforebegin")},insertAfter:function(a,c,b){return this.doInsert(a,c,b,"afterend","nextSibling")},insertFirst:function(a,c,b){return this.doInsert(a,c,b,"afterbegin","firstChild")},append:function(a,c,b){return this.doInsert(a,c,b,"beforeend","",true)},overwrite:function(a,c,b){a=Ext.getDom(a);a.innerHTML=this.markup(c);return b?Ext.get(a.firstChild):a.firstChild},doInsert:function(d,g,e,h,c,a){var b=this.insertHtml(h,Ext.getDom(d),this.markup(g));return e?Ext.get(b,true):b}});Ext.define("Ext.dom.AbstractElement_static",{override:"Ext.dom.AbstractElement",inheritableStatics:{unitRe:/\d+(px|em|%|en|ex|pt|in|cm|mm|pc)$/i,camelRe:/(-[a-z])/gi,msRe:/^-ms-/,cssRe:/([a-z0-9\-]+)\s*:\s*([^;\s]+(?:\s*[^;\s]+)*)?;?/gi,opacityRe:/alpha\(opacity=(.*)\)/i,propertyCache:{},defaultUnit:"px",borders:{l:"border-left-width",r:"border-right-width",t:"border-top-width",b:"border-bottom-width"},paddings:{l:"padding-left",r:"padding-right",t:"padding-top",b:"padding-bottom"},margins:{l:"margin-left",r:"margin-right",t:"margin-top",b:"margin-bottom"},addUnits:function(b,a){if(typeof b=="number"){return b+(a||this.defaultUnit||"px")}if(b===""||b=="auto"||b===undefined||b===null){return b||""}if(!this.unitRe.test(b)){return b||""}return b},isAncestor:function(b,d){var a=false;b=Ext.getDom(b);d=Ext.getDom(d);if(b&&d){if(b.contains){return b.contains(d)}else{if(b.compareDocumentPosition){return !!(b.compareDocumentPosition(d)&16)}else{while((d=d.parentNode)){a=d==b||a}}}}return a},parseBox:function(c){c=c||0;var a=typeof c,d,b;if(a==="number"){return{top:c,right:c,bottom:c,left:c}}else{if(a!=="string"){return c}}d=c.split(" ");b=d.length;if(b==1){d[1]=d[2]=d[3]=d[0]}else{if(b==2){d[2]=d[0];d[3]=d[1]}else{if(b==3){d[3]=d[1]}}}return{top:parseFloat(d[0])||0,right:parseFloat(d[1])||0,bottom:parseFloat(d[2])||0,left:parseFloat(d[3])||0}},unitizeBox:function(g,e){var d=this.addUnits,c=this.parseBox(g);return d(c.top,e)+" "+d(c.right,e)+" "+d(c.bottom,e)+" "+d(c.left,e)},camelReplaceFn:function(b,c){return c.charAt(1).toUpperCase()},normalize:function(a){if(a=="float"){a=Ext.supports.Float?"cssFloat":"styleFloat"}return this.propertyCache[a]||(this.propertyCache[a]=a.replace(this.msRe,"ms-").replace(this.camelRe,this.camelReplaceFn))},getDocumentHeight:function(){return Math.max(!Ext.isStrict?document.body.scrollHeight:document.documentElement.scrollHeight,this.getViewportHeight())},getDocumentWidth:function(){return Math.max(!Ext.isStrict?document.body.scrollWidth:document.documentElement.scrollWidth,this.getViewportWidth())},getViewportHeight:function(){return window.innerHeight},getViewportWidth:function(){return window.innerWidth},getViewSize:function(){return{width:window.innerWidth,height:window.innerHeight}},getOrientation:function(){if(Ext.supports.OrientationChange){return(window.orientation==0)?"portrait":"landscape"}return(window.innerHeight>window.innerWidth)?"portrait":"landscape"},fromPoint:function(a,b){return Ext.get(document.elementFromPoint(a,b))},parseStyles:function(c){var a={},b=this.cssRe,d;if(c){b.lastIndex=0;while((d=b.exec(c))){a[d[1]]=d[2]||""}}return a}}},function(){var c=document,b=null,a=c.compatMode=="CSS1Compat";if(!("activeElement" in c)&&c.addEventListener){c.addEventListener("focus",function(e){if(e&&e.target){b=(e.target==c)?null:e.target}},true)}function d(g,h,e){return function(){g.selectionStart=h;g.selectionEnd=e}}this.addInheritableStatics({getActiveElement:function(){var h;try{h=c.activeElement}catch(g){}h=h||b;if(!h){h=b=document.body}return h},getRightMarginFixCleaner:function(k){var h=Ext.supports,i=h.DisplayChangeInputSelectionBug,j=h.DisplayChangeTextAreaSelectionBug,l,e,m,g;if(i||j){l=c.activeElement||b;e=l&&l.tagName;if((j&&e=="TEXTAREA")||(i&&e=="INPUT"&&l.type=="text")){if(Ext.dom.Element.isAncestor(k,l)){m=l.selectionStart;g=l.selectionEnd;if(Ext.isNumber(m)&&Ext.isNumber(g)){return d(l,m,g)}}}}return Ext.emptyFn},getViewWidth:function(e){return e?Ext.dom.Element.getDocumentWidth():Ext.dom.Element.getViewportWidth()},getViewHeight:function(e){return e?Ext.dom.Element.getDocumentHeight():Ext.dom.Element.getViewportHeight()},getDocumentHeight:function(){return Math.max(!a?c.body.scrollHeight:c.documentElement.scrollHeight,Ext.dom.Element.getViewportHeight())},getDocumentWidth:function(){return Math.max(!a?c.body.scrollWidth:c.documentElement.scrollWidth,Ext.dom.Element.getViewportWidth())},getViewportHeight:function(){return Ext.isIE9m?(Ext.isStrict?c.documentElement.clientHeight:c.body.clientHeight):self.innerHeight},getViewportWidth:function(){return(!Ext.isStrict&&!Ext.isOpera)?c.body.clientWidth:Ext.isIE9m?c.documentElement.clientWidth:self.innerWidth},serializeForm:function(i){var j=i.elements||(document.forms[i]||Ext.getDom(i)).elements,t=false,s=encodeURIComponent,m="",l=j.length,n,g,r,v,u,p,k,q,h;for(p=0;p<l;p++){n=j[p];g=n.name;r=n.type;v=n.options;if(!n.disabled&&g){if(/select-(one|multiple)/i.test(r)){q=v.length;for(k=0;k<q;k++){h=v[k];if(h.selected){u=h.hasAttribute?h.hasAttribute("value"):h.getAttributeNode("value").specified;m+=Ext.String.format("{0}={1}&",s(g),s(u?h.value:h.text))}}}else{if(!(/file|undefined|reset|button/i.test(r))){if(!(/radio|checkbox/i.test(r)&&!n.checked)&&!(r=="submit"&&t)){m+=s(g)+"="+s(n.value)+"&";t=/submit/i.test(r)}}}}}return m.substr(0,m.length-1)}})});Ext.define("Ext.dom.AbstractElement_insertion",{override:"Ext.dom.AbstractElement",appendChild:function(d,c){var g=this,i,b,h,a;if(d.nodeType||d.dom||typeof d=="string"){d=Ext.getDom(d);g.dom.appendChild(d);return !c?Ext.get(d):d}else{if(d.length){i=Ext.fly(document.createDocumentFragment(),"_internal");b=d.length;Ext.DomHelper.useDom=true;for(h=0;h<b;h++){i.appendChild(d[h],c)}Ext.DomHelper.useDom=a;g.dom.appendChild(i.dom);return c?i.dom:i}else{return g.createChild(d,null,c)}}},appendTo:function(a){Ext.getDom(a).appendChild(this.dom);return this},insertBefore:function(a){a=Ext.getDom(a);a.parentNode.insertBefore(this.dom,a);return this},insertAfter:function(a){a=Ext.getDom(a);a.parentNode.insertBefore(this.dom,a.nextSibling);return this},insertFirst:function(b,a){b=b||{};if(b.nodeType||b.dom||typeof b=="string"){b=Ext.getDom(b);this.dom.insertBefore(b,this.dom.firstChild);return !a?Ext.get(b):b}else{return this.createChild(b,this.dom.firstChild,a)}},insertSibling:function(b,g,j){var i=this,k=Ext.core.DomHelper,l=k.useDom,m=(g||"before").toLowerCase()=="after",d,a,c,h;if(Ext.isArray(b)){a=Ext.fly(document.createDocumentFragment(),"_internal");c=b.length;k.useDom=true;for(h=0;h<c;h++){d=a.appendChild(b[h],j)}k.useDom=l;i.dom.parentNode.insertBefore(a.dom,m?i.dom.nextSibling:i.dom);return d}b=b||{};if(b.nodeType||b.dom){d=i.dom.parentNode.insertBefore(Ext.getDom(b),m?i.dom.nextSibling:i.dom);if(!j){d=Ext.get(d)}}else{if(m&&!i.dom.nextSibling){d=k.append(i.dom.parentNode,b,!j)}else{d=k[m?"insertAfter":"insertBefore"](i.dom,b,!j)}}return d},replace:function(a){a=Ext.get(a);this.insertBefore(a);a.remove();return this},replaceWith:function(a){var b=this;if(a.nodeType||a.dom||typeof a=="string"){a=Ext.get(a);b.dom.parentNode.insertBefore(a.dom,b.dom)}else{a=Ext.core.DomHelper.insertBefore(b.dom,a)}delete Ext.cache[b.id];Ext.removeNode(b.dom);b.id=Ext.id(b.dom=a);Ext.dom.AbstractElement.addToCache(b.isFlyweight?new Ext.dom.AbstractElement(b.dom):b);return b},createChild:function(b,a,c){b=b||{tag:"div"};if(a){return Ext.core.DomHelper.insertBefore(a,b,c!==true)}else{return Ext.core.DomHelper.append(this.dom,b,c!==true)}},wrap:function(b,c,a){var e=Ext.core.DomHelper.insertBefore(this.dom,b||{tag:"div"},true),d=e;if(a){d=Ext.DomQuery.selectNode(a,e.dom)}d.appendChild(this.dom);return c?e.dom:e},insertHtml:function(b,c,a){var d=Ext.core.DomHelper.insertHtml(b,this.dom,c);return a?Ext.get(d):d}});Ext.define("Ext.dom.AbstractElement_style",{override:"Ext.dom.AbstractElement"},function(){var d=this,m=/\w/g,q=/\s+/,c=/^(?:transparent|(?:rgba[(](?:\s*\d+\s*[,]){3}\s*0\s*[)]))$/i,j=Ext.supports.ClassList,e="padding",i="margin",a="border",r="-left",b="-right",o="-top",k="-bottom",p="-width",l={l:a+r+p,r:a+b+p,t:a+o+p,b:a+k+p},g={l:e+r,r:e+b,t:e+o,b:e+k},n={l:i+r,r:i+b,t:i+o,b:i+k},h=new d.Fly();Ext.override(d,{styleHooks:{},addStyles:function(z,y){var u=0,x=(z||"").match(m),w,s=x.length,v,t=[];if(s==1){u=Math.abs(parseFloat(this.getStyle(y[x[0]]))||0)}else{if(s){for(w=0;w<s;w++){v=x[w];t.push(y[v])}t=this.getStyle(t);for(w=0;w<s;w++){v=x[w];u+=Math.abs(parseFloat(t[y[v]])||0)}}}return u},addCls:(function(){var t=function(z){var A=this,w=A.dom,u=A.trimRe,B=z,v,C,x,y,D;if(typeof(z)=="string"){z=z.replace(u,"").split(q)}if(w&&z&&!!(y=z.length)){if(!w.className){w.className=z.join(" ")}else{v=w.classList;if(v){for(x=0;x<y;++x){D=z[x];if(D){if(!v.contains(D)){if(C){C.push(D)}else{C=w.className.replace(u,"");C=C?[C,D]:[D]}}}}if(C){w.className=C.join(" ")}}else{s(B)}}}return A},s=function(v){var w=this,x=w.dom,u;if(x&&v&&v.length){u=Ext.Element.mergeClsList(x.className,v);if(u.changed){x.className=u.join(" ")}}return w};return j?t:s})(),removeCls:function(u){var v=this,x=v.dom,w,s,t;if(typeof(u)=="string"){u=u.replace(v.trimRe,"").split(q)}if(x&&x.className&&u&&!!(s=u.length)){w=x.classList;if(s===1&&w){if(u[0]){w.remove(u[0])}}else{t=Ext.Element.removeCls(x.className,u);if(t.changed){x.className=t.join(" ")}}}return v},radioCls:function(w){var x=this.dom.parentNode.childNodes,t,u,s;w=Ext.isArray(w)?w:[w];for(u=0,s=x.length;u<s;u++){t=x[u];if(t&&t.nodeType==1){h.attach(t).removeCls(w)}}return this.addCls(w)},toggleCls:(function(){var s=function(u){var v=this,x=v.dom,w;if(x){u=u.replace(v.trimRe,"");if(u){w=x.classList;if(w){w.toggle(u)}else{t(u)}}}return v},t=function(u){return this.hasCls(u)?this.removeCls(u):this.addCls(u)};return j?s:t})(),hasCls:(function(){var s=function(v){var x=this.dom,u=false,w;if(x&&v){w=x.classList;if(w){u=w.contains(v)}else{u=t(v)}}return u},t=function(u){var v=this.dom;return v?u&&(" "+v.className+" ").indexOf(" "+u+" ")!==-1:false};return j?s:t})(),replaceCls:function(t,s){return this.removeCls(t).addCls(s)},isStyle:function(s,t){return this.getStyle(s)==t},getStyle:function(E,z){var A=this,v=A.dom,H=typeof E!="string",F=A.styleHooks,t=E,B=t,y=1,x,G,D,C,u,s,w;if(H){D={};t=B[0];w=0;if(!(y=B.length)){return D}}if(!v||v.documentElement){return D||""}x=v.style;if(z){s=x}else{s=v.ownerDocument.defaultView.getComputedStyle(v,null);if(!s){z=true;s=x}}do{C=F[t];if(!C){F[t]=C={name:d.normalize(t)}}if(C.get){u=C.get(v,A,z,s)}else{G=C.name;u=s[G]}if(!H){return u}D[t]=u;t=B[++w]}while(w<y);return D},getStyles:function(){var t=Ext.Array.slice(arguments),s=t.length,u;if(s&&typeof t[s-1]=="boolean"){u=t.pop()}return this.getStyle(t,u)},isTransparent:function(t){var s=this.getStyle(t);return s?c.test(s):false},setStyle:function(z,x){var v=this,y=v.dom,s=v.styleHooks,u=y.style,t=z,w;if(typeof t=="string"){w=s[t];if(!w){s[t]=w={name:d.normalize(t)}}x=(x==null)?"":x;if(w.set){w.set(y,x,v)}else{u[w.name]=x}if(w.afterSet){w.afterSet(y,x,v)}}else{for(t in z){if(z.hasOwnProperty(t)){w=s[t];if(!w){s[t]=w={name:d.normalize(t)}}x=z[t];x=(x==null)?"":x;if(w.set){w.set(y,x,v)}else{u[w.name]=x}if(w.afterSet){w.afterSet(y,x,v)}}}}return v},getHeight:function(t){var u=this.dom,s=t?(u.clientHeight-this.getPadding("tb")):u.offsetHeight;return s>0?s:0},getWidth:function(s){var u=this.dom,t=s?(u.clientWidth-this.getPadding("lr")):u.offsetWidth;return t>0?t:0},setWidth:function(s){var t=this;t.dom.style.width=d.addUnits(s);return t},setHeight:function(s){var t=this;t.dom.style.height=d.addUnits(s);return t},getBorderWidth:function(s){return this.addStyles(s,l)},getPadding:function(s){return this.addStyles(s,g)},margins:n,applyStyles:function(u){if(u){var t,s,v=this.dom;if(typeof u=="function"){u=u.call()}if(typeof u=="string"){u=Ext.util.Format.trim(u).split(/\s*(?::|;)\s*/);for(t=0,s=u.length;t<s;){v.style[d.normalize(u[t++])]=u[t++]}}else{if(typeof u=="object"){this.setStyle(u)}}}},setSize:function(u,s){var v=this,t=v.dom.style;if(Ext.isObject(u)){s=u.height;u=u.width}t.width=d.addUnits(u);t.height=d.addUnits(s);return v},getViewSize:function(){var s=document,t=this.dom;if(t==s||t==s.body){return{width:d.getViewportWidth(),height:d.getViewportHeight()}}else{return{width:t.clientWidth,height:t.clientHeight}}},getSize:function(t){var s=this.dom;return{width:Math.max(0,t?(s.clientWidth-this.getPadding("lr")):s.offsetWidth),height:Math.max(0,t?(s.clientHeight-this.getPadding("tb")):s.offsetHeight)}},repaint:function(){var s=this.dom;this.addCls(Ext.baseCSSPrefix+"repaint");setTimeout(function(){h.attach(s).removeCls(Ext.baseCSSPrefix+"repaint")},1);return this},getMargin:function(t){var u=this,w={t:"top",l:"left",r:"right",b:"bottom"},s,x,v;if(!t){v=[];for(s in u.margins){if(u.margins.hasOwnProperty(s)){v.push(u.margins[s])}}x=u.getStyle(v);if(x&&typeof x=="object"){for(s in u.margins){if(u.margins.hasOwnProperty(s)){x[w[s]]=parseFloat(x[u.margins[s]])||0}}}return x}else{return u.addStyles(t,u.margins)}},mask:function(t,x,B){var y=this,u=y.dom,v=(y.$cache||y.getCache()).data,s=v.mask,C,A,z="",w=Ext.baseCSSPrefix;y.addCls(w+"masked");if(y.getStyle("position")=="static"){y.addCls(w+"masked-relative")}if(s){s.remove()}if(x&&typeof x=="string"){z=" "+x}else{z=" "+w+"mask-gray"}C=y.createChild({cls:w+"mask"+((B!==false)?"":(" "+w+"mask-gray")),html:t?('<div class="'+(x||(w+"mask-message"))+'">'+t+"</div>"):""});A=y.getSize();v.mask=C;if(u===document.body){A.height=window.innerHeight;if(y.orientationHandler){Ext.EventManager.unOrientationChange(y.orientationHandler,y)}y.orientationHandler=function(){A=y.getSize();A.height=window.innerHeight;C.setSize(A)};Ext.EventManager.onOrientationChange(y.orientationHandler,y)}C.setSize(A);if(Ext.is.iPad){Ext.repaint()}},unmask:function(){var t=this,v=(t.$cache||t.getCache()).data,s=v.mask,u=Ext.baseCSSPrefix;if(s){s.remove();delete v.mask}t.removeCls([u+"masked",u+"masked-relative"]);if(t.dom===document.body){Ext.EventManager.unOrientationChange(t.orientationHandler,t);delete t.orientationHandler}}});Ext.onReady(function(){var A=Ext.supports,s,y,w,t,z;function x(F,C,E,B){var D=B[this.name]||"";return c.test(D)?"transparent":D}function v(H,E,G,D){var B=D.marginRight,C,F;if(B!="0px"){C=H.style;F=C.display;C.display="inline-block";B=(G?D:H.ownerDocument.defaultView.getComputedStyle(H,null)).marginRight;C.display=F}return B}function u(I,F,H,E){var B=E.marginRight,D,C,G;if(B!="0px"){D=I.style;C=d.getRightMarginFixCleaner(I);G=D.display;D.display="inline-block";B=(H?E:I.ownerDocument.defaultView.getComputedStyle(I,"")).marginRight;D.display=G;C()}return B}s=d.prototype.styleHooks;if(A.init){A.init()}if(!A.RightMargin){s.marginRight=s["margin-right"]={name:"marginRight",get:(A.DisplayChangeInputSelectionBug||A.DisplayChangeTextAreaSelectionBug)?u:v}}if(!A.TransparentColor){y=["background-color","border-color","color","outline-color"];for(w=y.length;w--;){t=y[w];z=d.normalize(t);s[t]=s[z]={name:z,get:x}}}})});Ext.define("Ext.dom.AbstractElement_traversal",{override:"Ext.dom.AbstractElement",findParent:function(h,b,a){var e=this.dom,c=document.documentElement,g=0,d;b=b||50;if(isNaN(b)){d=Ext.getDom(b);b=Number.MAX_VALUE}while(e&&e.nodeType==1&&g<b&&e!=c&&e!=d){if(Ext.DomQuery.is(e,h)){return a?Ext.get(e):e}g++;e=e.parentNode}return null},findParentNode:function(d,b,a){var c=Ext.fly(this.dom.parentNode,"_internal");return c?c.findParent(d,b,a):null},up:function(c,a,b){return this.findParentNode(c,a,!b)},select:function(a,b){return Ext.dom.Element.select(a,this.dom,b)},query:function(a){return Ext.DomQuery.select(a,this.dom)},down:function(a,b){var c=Ext.DomQuery.selectNode(a,this.dom);return b?c:Ext.get(c)},child:function(a,b){var d,c=this,e;e=Ext.id(c.dom);e=Ext.escapeId(e);d=Ext.DomQuery.selectNode("#"+e+" > "+a,c.dom);return b?d:Ext.get(d)},parent:function(a,b){return this.matchNode("parentNode","parentNode",a,b)},next:function(a,b){return this.matchNode("nextSibling","nextSibling",a,b)},prev:function(a,b){return this.matchNode("previousSibling","previousSibling",a,b)},first:function(a,b){return this.matchNode("nextSibling","firstChild",a,b)},last:function(a,b){return this.matchNode("previousSibling","lastChild",a,b)},matchNode:function(b,e,a,c){if(!this.dom){return null}var d=this.dom[e];while(d){if(d.nodeType==1&&(!a||Ext.DomQuery.is(d,a))){return !c?Ext.get(d):d}d=d[b]}return null},isAncestor:function(a){return this.self.isAncestor.call(this.self,this.dom,a)}});Ext.define("Ext.dom.AbstractElement",{trimRe:/^\s+|\s+$/g,whitespaceRe:/\s/,inheritableStatics:{trimRe:/^\s+|\s+$/g,whitespaceRe:/\s/,get:function(c){var i=this,j=window.document,d=Ext.dom.Element,h,b,g,e,a;if(!c){return null}if(c.isFly){c=c.dom}if(typeof c=="string"){if(c==Ext.windowId){return d.get(window)}else{if(c==Ext.documentId){return d.get(j)}}h=Ext.cache[c];if(h&&h.skipGarbageCollection){g=h.el;return g}if(!(e=j.getElementById(c))){return null}if(h&&h.el){g=Ext.updateCacheEntry(h,e).el}else{g=new d(e,!!h)}return g}else{if(c.tagName){if(!(a=c.id)){a=Ext.id(c)}h=Ext.cache[a];if(h&&h.el){g=Ext.updateCacheEntry(h,c).el}else{g=new d(c,!!h)}return g}else{if(c instanceof i){if(c!=i.docEl&&c!=i.winEl){a=c.id;h=Ext.cache[a];if(h){Ext.updateCacheEntry(h,j.getElementById(a)||c.dom)}}return c}else{if(c.isComposite){return c}else{if(Ext.isArray(c)){return i.select(c)}else{if(c===j){if(!i.docEl){b=i.docEl=Ext.Object.chain(d.prototype);b.dom=j;b.el=b;b.id=Ext.id(j);i.addToCache(b)}return i.docEl}else{if(c===window){if(!i.winEl){i.winEl=Ext.Object.chain(d.prototype);i.winEl.dom=window;i.winEl.id=Ext.id(window);i.addToCache(i.winEl)}return i.winEl}}}}}}}return null},addToCache:function(a,b){if(a){Ext.addCacheEntry(b,a)}return a},addMethods:function(){this.override.apply(this,arguments)},mergeClsList:function(){var m,k={},g,b,d,h,c,n=[],e=false,a=this.trimRe,l=this.whitespaceRe;for(g=0,b=arguments.length;g<b;g++){m=arguments[g];if(Ext.isString(m)){m=m.replace(a,"").split(l)}if(m){for(d=0,h=m.length;d<h;d++){c=m[d];if(!k[c]){if(g){e=true}k[c]=true}}}}for(c in k){n.push(c)}n.changed=e;return n},removeCls:function(a,b){var h={},g,c,d,k=[],e=false,j=this.whitespaceRe;if(a){if(Ext.isString(a)){a=a.replace(this.trimRe,"").split(j)}for(g=0,c=a.length;g<c;g++){h[a[g]]=true}}if(b){if(Ext.isString(b)){b=b.split(j)}for(g=0,c=b.length;g<c;g++){d=b[g];if(h[d]){e=true;delete h[d]}}}for(d in h){k.push(d)}k.changed=e;return k},VISIBILITY:1,DISPLAY:2,OFFSETS:3,ASCLASS:4},constructor:function(a,b){var c=this,d=typeof a=="string"?document.getElementById(a):a,e;c.el=c;if(!d){return null}e=d.id;if(!b&&e&&Ext.cache[e]){return Ext.cache[e].el}c.dom=d;c.id=e||Ext.id(d);c.self.addToCache(c)},set:function(e,b){var c=this.dom,a,d;for(a in e){if(e.hasOwnProperty(a)){d=e[a];if(a=="style"){this.applyStyles(d)}else{if(a=="cls"){c.className=d}else{if(b!==false){if(d===undefined){c.removeAttribute(a)}else{c.setAttribute(a,d)}}else{c[a]=d}}}}}return this},defaultUnit:"px",is:function(a){return Ext.DomQuery.is(this.dom,a)},getValue:function(a){var b=this.dom.value;return a?parseInt(b,10):b},remove:function(){var a=this,b=a.dom;if(a.isAnimate){a.stopAnimation()}if(b){Ext.removeNode(b);delete a.dom}},contains:function(a){if(!a){return false}var b=this,c=a.dom||a;return(c===b.dom)||Ext.dom.AbstractElement.isAncestor(b.dom,c)},getAttribute:function(a,b){var c=this.dom;return c.getAttributeNS(b,a)||c.getAttribute(b+":"+a)||c.getAttribute(a)||c[a]},update:function(a){if(this.dom){this.dom.innerHTML=a}return this},setHTML:function(a){if(this.dom){this.dom.innerHTML=a}return this},getHTML:function(){return this.dom?this.dom.innerHTML:""},hide:function(){this.setVisible(false);return this},show:function(){this.setVisible(true);return this},setVisible:function(g,a){var b=this,e=b.self,d=b.getVisibilityMode(),c=Ext.baseCSSPrefix;switch(d){case e.VISIBILITY:b.removeCls([c+"hidden-display",c+"hidden-offsets"]);b[g?"removeCls":"addCls"](c+"hidden-visibility");break;case e.DISPLAY:b.removeCls([c+"hidden-visibility",c+"hidden-offsets"]);b[g?"removeCls":"addCls"](c+"hidden-display");break;case e.OFFSETS:b.removeCls([c+"hidden-visibility",c+"hidden-display"]);b[g?"removeCls":"addCls"](c+"hidden-offsets");break}return b},getVisibilityMode:function(){var b=(this.$cache||this.getCache()).data,a=b.visibilityMode;if(a===undefined){b.visibilityMode=a=this.self.DISPLAY}return a},setVisibilityMode:function(a){(this.$cache||this.getCache()).data.visibilityMode=a;return this},getCache:function(){var a=this,b=a.dom.id||Ext.id(a.dom);a.$cache=Ext.cache[b]||Ext.addCacheEntry(b,null,a.dom);return a.$cache}},function(){var a=this;Ext.getDetachedBody=function(){var b=a.detachedBodyEl;if(!b){b=document.createElement("div");a.detachedBodyEl=b=new a.Fly(b);b.isDetachedBody=true}return b};Ext.getElementById=function(d){var c=document.getElementById(d),b;if(!c&&(b=a.detachedBodyEl)){c=b.dom.querySelector("#"+Ext.escapeId(d))}return c};Ext.get=function(b){return Ext.dom.Element.get(b)};this.addStatics({Fly:new Ext.Class({extend:a,isFly:true,constructor:function(b){this.dom=b;this.el=this},attach:function(b){this.dom=b;this.$cache=b.id?Ext.cache[b.id]:null;return this}}),_flyweights:{},fly:function(e,c){var d=null,b=a._flyweights;c=c||"_global";e=Ext.getDom(e);if(e){d=b[c]||(b[c]=new a.Fly());d.dom=e;d.$cache=e.id?Ext.cache[e.id]:null}return d}});Ext.fly=function(){return a.fly.apply(a,arguments)};(function(b){b.destroy=b.remove;if(document.querySelector){b.getById=function(e,c){var d=document.getElementById(e)||this.dom.querySelector("#"+Ext.escapeId(e));return c?d:(d?Ext.get(d):null)}}else{b.getById=function(e,c){var d=document.getElementById(e);return c?d:(d?Ext.get(d):null)}}}(this.prototype))});Ext.define("Ext.dom.Helper",(function(){var b="afterbegin",i="afterend",a="beforebegin",o="beforeend",l="<table>",h="</table>",c=l+"<tbody>",n="</tbody>"+h,k=c+"<tr>",e="</tr>"+n,p=document.createElement("div"),m=["BeforeBegin","previousSibling"],j=["AfterEnd","nextSibling"],d={beforebegin:m,afterend:j},g={beforebegin:m,afterend:j,afterbegin:["AfterBegin","firstChild"],beforeend:["BeforeEnd","lastChild"]};return{extend:Ext.dom.AbstractHelper,tableRe:/^(?:table|thead|tbody|tr|td)$/i,tableElRe:/td|tr|tbody|thead/i,useDom:false,createDom:function(q,w){var r,z=document,u,x,s,y,v,t;if(Ext.isArray(q)){r=z.createDocumentFragment();for(v=0,t=q.length;v<t;v++){this.createDom(q[v],r)}}else{if(typeof q=="string"){r=z.createTextNode(q)}else{r=z.createElement(q.tag||"div");u=!!r.setAttribute;for(x in q){if(!this.confRe.test(x)){s=q[x];if(x=="cls"){r.className=s}else{if(u){r.setAttribute(x,s)}else{r[x]=s}}}}Ext.DomHelper.applyStyles(r,q.style);if((y=q.children||q.cn)){this.createDom(y,r)}else{if(q.html){r.innerHTML=q.html}}}}if(w){w.appendChild(r)}return r},ieTable:function(v,q,w,u){p.innerHTML=[q,w,u].join("");var r=-1,t=p,s;while(++r<v){t=t.firstChild}s=t.nextSibling;if(s){s=t;t=document.createDocumentFragment();while(s){nx=s.nextSibling;t.appendChild(s);s=nx}}return t},insertIntoTable:function(z,s,r,t){var q,w,v=s==a,y=s==b,u=s==o,x=s==i;if(z=="td"&&(y||u)||!this.tableElRe.test(z)&&(v||x)){return null}w=v?r:x?r.nextSibling:y?r.firstChild:null;if(v||x){r=r.parentNode}if(z=="td"||(z=="tr"&&(u||y))){q=this.ieTable(4,k,t,e)}else{if(((z=="tbody"||z=="thead")&&(u||y))||(z=="tr"&&(v||x))){q=this.ieTable(3,c,t,n)}else{q=this.ieTable(2,l,t,h)}}r.insertBefore(q,w);return q},createContextualFragment:function(r){var q=document.createDocumentFragment(),s,t;p.innerHTML=r;t=p.childNodes;s=t.length;while(s--){q.appendChild(t[0])}return q},applyStyles:function(q,r){if(r){if(typeof r=="function"){r=r.call()}if(typeof r=="string"){r=Ext.dom.Element.parseStyles(r)}if(typeof r=="object"){Ext.fly(q,"_applyStyles").setStyle(r)}}},createHtml:function(q){return this.markup(q)},doInsert:function(t,v,u,w,s,q){t=t.dom||Ext.getDom(t);var r;if(this.useDom){r=this.createDom(v,null);if(q){t.appendChild(r)}else{(s=="firstChild"?t:t.parentNode).insertBefore(r,t[s]||t)}}else{r=this.insertHtml(w,t,this.markup(v))}return u?Ext.get(r,true):r},overwrite:function(s,r,t){var q;s=Ext.getDom(s);r=this.markup(r);if(Ext.isIE&&this.tableRe.test(s.tagName)){while(s.firstChild){s.removeChild(s.firstChild)}if(r){q=this.insertHtml("afterbegin",s,r);return t?Ext.get(q):q}return null}s.innerHTML=r;return t?Ext.get(s.firstChild):s.firstChild},insertHtml:function(s,v,t){var x,r,u,q,w;s=s.toLowerCase();if(v.insertAdjacentHTML){if(Ext.isIE&&this.tableRe.test(v.tagName)&&(w=this.insertIntoTable(v.tagName.toLowerCase(),s,v,t))){return w}if((x=g[s])){if(Ext.global.MSApp&&Ext.global.MSApp.execUnsafeLocalFunction){MSApp.execUnsafeLocalFunction(function(){v.insertAdjacentHTML(x[0],t)})}else{v.insertAdjacentHTML(x[0],t)}return v[x[1]]}}else{if(v.nodeType===3){s=s==="afterbegin"?"beforebegin":s;s=s==="beforeend"?"afterend":s}r=Ext.supports.CreateContextualFragment?v.ownerDocument.createRange():undefined;q="setStart"+(this.endRe.test(s)?"After":"Before");if(d[s]){if(r){r[q](v);w=r.createContextualFragment(t)}else{w=this.createContextualFragment(t)}v.parentNode.insertBefore(w,s==a?v:v.nextSibling);return v[(s==a?"previous":"next")+"Sibling"]}else{u=(s==b?"first":"last")+"Child";if(v.firstChild){if(r){r[q](v[u]);w=r.createContextualFragment(t)}else{w=this.createContextualFragment(t)}if(s==b){v.insertBefore(w,v.firstChild)}else{v.appendChild(w)}}else{v.innerHTML=t}return v[u]}}},createTemplate:function(r){var q=this.markup(r);return new Ext.Template(q)}}})(),function(){Ext.ns("Ext.core");Ext.DomHelper=Ext.core.DomHelper=new this});Ext.define("Ext.Template",{inheritableStatics:{from:function(b,a){b=Ext.getDom(b);return new this(b.value||b.innerHTML,a||"")}},constructor:function(d){var g=this,b=arguments,a=[],c=0,e=b.length,h;g.initialConfig={};if(e===1&&Ext.isArray(d)){b=d;e=b.length}if(e>1){for(;c<e;c++){h=b[c];if(typeof h=="object"){Ext.apply(g.initialConfig,h);Ext.apply(g,h)}else{a.push(h)}}}else{a.push(d)}g.html=a.join("");if(g.compiled){g.compile()}},isTemplate:true,disableFormats:false,re:/\{([\w\-]+)(?:\:([\w\.]*)(?:\((.*?)?\))?)?\}/g,apply:function(a){var h=this,d=h.disableFormats!==true,g=Ext.util.Format,c=h,b;if(h.compiled){return h.compiled(a).join("")}function e(i,k,l,j){if(l&&d){if(j){j=[a[k]].concat(Ext.functionFactory("return ["+j+"];")())}else{j=[a[k]]}if(l.substr(0,5)=="this."){return c[l.substr(5)].apply(c,j)}else{return g[l].apply(g,j)}}else{return a[k]!==undefined?a[k]:""}}b=h.html.replace(h.re,e);return b},applyOut:function(a,b){var c=this;if(c.compiled){b.push.apply(b,c.compiled(a))}else{b.push(c.apply(a))}return b},applyTemplate:function(){return this.apply.apply(this,arguments)},set:function(a,c){var b=this;b.html=a;b.compiled=null;return c?b.compile():b},compileARe:/\\/g,compileBRe:/(\r\n|\n)/g,compileCRe:/'/g,compile:function(){var me=this,fm=Ext.util.Format,useFormat=me.disableFormats!==true,body,bodyReturn;function fn(m,name,format,args){if(format&&useFormat){args=args?","+args:"";if(format.substr(0,5)!="this."){format="fm."+format+"("}else{format="this."+format.substr(5)+"("}}else{args="";format="(values['"+name+"'] == undefined ? '' : "}return"',"+format+"values['"+name+"']"+args+") ,'"}bodyReturn=me.html.replace(me.compileARe,"\\\\").replace(me.compileBRe,"\\n").replace(me.compileCRe,"\\'").replace(me.re,fn);body="this.compiled = function(values){ return ['"+bodyReturn+"'];};";eval(body);return me},insertFirst:function(b,a,c){return this.doInsert("afterBegin",b,a,c)},insertBefore:function(b,a,c){return this.doInsert("beforeBegin",b,a,c)},insertAfter:function(b,a,c){return this.doInsert("afterEnd",b,a,c)},append:function(b,a,c){return this.doInsert("beforeEnd",b,a,c)},doInsert:function(b,d,a,e){var c=Ext.DomHelper.insertHtml(b,Ext.getDom(d),this.apply(a));return e?Ext.get(c):c},overwrite:function(c,a,d){var b=Ext.DomHelper.overwrite(Ext.getDom(c),this.apply(a));return d?Ext.get(b):b}});Ext.define("Ext.XTemplateParser",{constructor:function(a){Ext.apply(this,a)},doTpl:Ext.emptyFn,parse:function(l){var v=this,p=l.length,o={elseif:"elif"},q=v.topRe,c=v.actionsRe,e,d,j,n,h,k,i,u,r,b,g,a;v.level=0;v.stack=d=[];for(e=0;e<p;e=b){q.lastIndex=e;n=q.exec(l);if(!n){v.doText(l.substring(e,p));break}r=n.index;b=q.lastIndex;if(e<r){v.doText(l.substring(e,r))}if(n[1]){b=l.indexOf("%}",r+2);v.doEval(l.substring(r+2,b));b+=2}else{if(n[2]){b=l.indexOf("]}",r+2);v.doExpr(l.substring(r+2,b));b+=2}else{if(n[3]){v.doTag(n[3])}else{if(n[4]){g=null;while((u=c.exec(n[4]))!==null){j=u[2]||u[3];if(j){j=Ext.String.htmlDecode(j);h=u[1];h=o[h]||h;g=g||{};k=g[h];if(typeof k=="string"){g[h]=[k,j]}else{if(k){g[h].push(j)}else{g[h]=j}}}}if(!g){if(v.elseRe.test(n[4])){v.doElse()}else{if(v.defaultRe.test(n[4])){v.doDefault()}else{v.doTpl();d.push({type:"tpl"})}}}else{if(g["if"]){v.doIf(g["if"],g);d.push({type:"if"})}else{if(g["switch"]){v.doSwitch(g["switch"],g);d.push({type:"switch"})}else{if(g["case"]){v.doCase(g["case"],g)}else{if(g.elif){v.doElseIf(g.elif,g)}else{if(g["for"]){++v.level;if(a=v.propRe.exec(n[4])){g.propName=a[1]||a[2]}v.doFor(g["for"],g);d.push({type:"for",actions:g})}else{if(g.foreach){++v.level;if(a=v.propRe.exec(n[4])){g.propName=a[1]||a[2]}v.doForEach(g.foreach,g);d.push({type:"foreach",actions:g})}else{if(g.exec){v.doExec(g.exec,g);d.push({type:"exec",actions:g})}}}}}}}}}else{if(n[0].length===5){d.push({type:"tpl"})}else{i=d.pop();v.doEnd(i.type,i.actions);if(i.type=="for"||i.type=="foreach"){--v.level}}}}}}}},topRe:/(?:(\{\%)|(\{\[)|\{([^{}]+)\})|(?:<tpl([^>]*)\>)|(?:<\/tpl>)/g,actionsRe:/\s*(elif|elseif|if|for|foreach|exec|switch|case|eval|between)\s*\=\s*(?:(?:"([^"]*)")|(?:'([^']*)'))\s*/g,propRe:/prop=(?:(?:"([^"]*)")|(?:'([^']*)'))/,defaultRe:/^\s*default\s*$/,elseRe:/^\s*else\s*$/});Ext.define("Ext.XTemplateCompiler",{extend:Ext.XTemplateParser,useEval:Ext.isGecko,useIndex:Ext.isIE8m,useFormat:true,propNameRe:/^[\w\d\$]*$/,compile:function(a){var c=this,b=c.generate(a);return c.useEval?c.evalTpl(b):(new Function("Ext",b))(Ext)},generate:function(a){var d=this,b="var fm=Ext.util.Format,ts=Object.prototype.toString;",c;d.maxLevel=0;d.body=["var c0=values, a0="+d.createArrayTest(0)+", p0=parent, n0=xcount, i0=xindex, k0, v;\n"];if(d.definitions){if(typeof d.definitions==="string"){d.definitions=[d.definitions,b]}else{d.definitions.push(b)}}else{d.definitions=[b]}d.switches=[];d.parse(a);d.definitions.push((d.useEval?"$=":"return")+" function ("+d.fnArgs+") {",d.body.join(""),"}");c=d.definitions.join("\n");d.definitions.length=d.body.length=d.switches.length=0;delete d.definitions;delete d.body;delete d.switches;return c},doText:function(c){var b=this,a=b.body;c=c.replace(b.aposRe,"\\'").replace(b.newLineRe,"\\n");if(b.useIndex){a.push("out[out.length]='",c,"'\n")}else{a.push("out.push('",c,"')\n")}},doExpr:function(b){var a=this.body;a.push("if ((v="+b+") != null) out");if(this.useIndex){a.push("[out.length]=v+''\n")}else{a.push(".push(v+'')\n")}},doTag:function(a){var b=this.parseTag(a);if(b){this.doExpr(b)}else{this.doText("{"+a+"}")}},doElse:function(){this.body.push("} else {\n")},doEval:function(a){this.body.push(a,"\n")},doIf:function(b,c){var a=this;if(b==="."){a.body.push("if (values) {\n")}else{if(a.propNameRe.test(b)){a.body.push("if (",a.parseTag(b),") {\n")}else{a.body.push("if (",a.addFn(b),a.callFn,") {\n")}}if(c.exec){a.doExec(c.exec)}},doElseIf:function(b,c){var a=this;if(b==="."){a.body.push("else if (values) {\n")}else{if(a.propNameRe.test(b)){a.body.push("} else if (",a.parseTag(b),") {\n")}else{a.body.push("} else if (",a.addFn(b),a.callFn,") {\n")}}if(c.exec){a.doExec(c.exec)}},doSwitch:function(b){var a=this;if(b==="."){a.body.push("switch (values) {\n")}else{if(a.propNameRe.test(b)){a.body.push("switch (",a.parseTag(b),") {\n")}else{a.body.push("switch (",a.addFn(b),a.callFn,") {\n")}}a.switches.push(0)},doCase:function(e){var d=this,c=Ext.isArray(e)?e:[e],g=d.switches.length-1,a,b;if(d.switches[g]){d.body.push("break;\n")}else{d.switches[g]++}for(b=0,g=c.length;b<g;++b){a=d.intRe.exec(c[b]);c[b]=a?a[1]:("'"+c[b].replace(d.aposRe,"\\'")+"'")}d.body.push("case ",c.join(": case "),":\n")},doDefault:function(){var a=this,b=a.switches.length-1;if(a.switches[b]){a.body.push("break;\n")}else{a.switches[b]++}a.body.push("default:\n")},doEnd:function(b,d){var c=this,a=c.level-1;if(b=="for"||b=="foreach"){if(d.exec){c.doExec(d.exec)}c.body.push("}\n");c.body.push("parent=p",a,";values=r",a+1,";xcount=n"+a+";xindex=i",a,"+1;xkey=k",a,";\n")}else{if(b=="if"||b=="switch"){c.body.push("}\n")}}},doFor:function(e,h){var d=this,c,b=d.level,a=b-1,g;if(e==="."){c="values"}else{if(d.propNameRe.test(e)){c=d.parseTag(e)}else{c=d.addFn(e)+d.callFn}}if(d.maxLevel<b){d.maxLevel=b;d.body.push("var ")}if(e=="."){g="c"+b}else{g="a"+a+"?c"+a+"[i"+a+"]:c"+a}d.body.push("i",b,"=0,n",b,"=0,c",b,"=",c,",a",b,"=",d.createArrayTest(b),",r",b,"=values,p",b,",k",b,";\n","p",b,"=parent=",g,"\n","if (c",b,"){if(a",b,"){n",b,"=c",b,".length;}else if (c",b,".isMixedCollection){c",b,"=c",b,".items;n",b,"=c",b,".length;}else if(c",b,".isStore){c",b,"=c",b,".data.items;n",b,"=c",b,".length;}else{c",b,"=[c",b,"];n",b,"=1;}}\n","for (xcount=n",b,";i",b,"<n"+b+";++i",b,"){\n","values=c",b,"[i",b,"]");if(h.propName){d.body.push(".",h.propName)}d.body.push("\n","xindex=i",b,"+1\n");if(h.between){d.body.push('if(xindex>1){ out.push("',h.between,'"); } \n')}},doForEach:function(e,h){var d=this,c,b=d.level,a=b-1,g;if(e==="."){c="values"}else{if(d.propNameRe.test(e)){c=d.parseTag(e)}else{c=d.addFn(e)+d.callFn}}if(d.maxLevel<b){d.maxLevel=b;d.body.push("var ")}if(e=="."){g="c"+b}else{g="a"+a+"?c"+a+"[i"+a+"]:c"+a}d.body.push("i",b,"=-1,n",b,"=0,c",b,"=",c,",a",b,"=",d.createArrayTest(b),",r",b,"=values,p",b,",k",b,";\n","p",b,"=parent=",g,"\n","for(k",b," in c",b,"){\n","xindex=++i",b,"+1;\n","xkey=k",b,";\n","values=c",b,"[k",b,"];");if(h.propName){d.body.push(".",h.propName)}if(h.between){d.body.push('if(xindex>1){ out.push("',h.between,'"); } \n')}},createArrayTest:("isArray" in Array)?function(a){return"Array.isArray(c"+a+")"}:function(a){return"ts.call(c"+a+')==="[object Array]"'},doExec:function(c,d){var b=this,a="f"+b.definitions.length;b.definitions.push("function "+a+"("+b.fnArgs+") {"," try { with(values) {","  "+c," }} catch(e) {","}","}");b.body.push(a+b.callFn+"\n")},addFn:function(a){var c=this,b="f"+c.definitions.length;if(a==="."){c.definitions.push("function "+b+"("+c.fnArgs+") {"," return values","}")}else{if(a===".."){c.definitions.push("function "+b+"("+c.fnArgs+") {"," return parent","}")}else{c.definitions.push("function "+b+"("+c.fnArgs+") {"," try { with(values) {","  return("+a+")"," }} catch(e) {","}","}")}}return b},parseTag:function(b){var h=this,a=h.tagRe.exec(b),e,i,d,g,c;if(!a){return null}e=a[1];i=a[2];d=a[3];g=a[4];if(e=="."){if(!h.validTypes){h.definitions.push("var validTypes={string:1,number:1,boolean:1};");h.validTypes=true}c='validTypes[typeof values] || ts.call(values) === "[object Date]" ? values : ""'}else{if(e=="#"){c="xindex"}else{if(e=="$"){c="xkey"}else{if(e.substr(0,7)=="parent."){c=e}else{if(isNaN(e)&&e.indexOf("-")==-1&&e.indexOf(".")!=-1){c="values."+e}else{c="values['"+e+"']"}}}}}if(g){c="("+c+g+")"}if(i&&h.useFormat){d=d?","+d:"";if(i.substr(0,5)!="this."){i="fm."+i+"("}else{i+="("}}else{return c}return i+c+d+")"},evalTpl:function($){eval($);return $},newLineRe:/\r\n|\r|\n/g,aposRe:/[']/g,intRe:/^\s*(\d+)\s*$/,tagRe:/^([\w-\.\#\$]+)(?:\:([\w\.]*)(?:\((.*?)?\))?)?(\s?[\+\-\*\/]\s?[\d\.\+\-\*\/\(\)]+)?$/},function(){var a=this.prototype;a.fnArgs="out,values,parent,xindex,xcount,xkey";a.callFn=".call(this,"+a.fnArgs+")"});Ext.define("Ext.XTemplate",{extend:Ext.Template,emptyObj:{},apply:function(a,b){return this.applyOut(a,[],b).join("")},applyOut:function(a,b,d){var g=this,c;if(!g.fn){c=new Ext.XTemplateCompiler({useFormat:g.disableFormats!==true,definitions:g.definitions});g.fn=c.compile(g.html)}try{g.fn(b,a,d||g.emptyObj,1,1)}catch(h){}return b},compile:function(){return this},statics:{getTpl:function(b,d){var c=b[d],a;if(c&&!c.isTemplate){c=Ext.ClassManager.dynInstantiate("Ext.XTemplate",c);if(b.hasOwnProperty(d)){a=b}else{for(a=b.self.prototype;a&&!a.hasOwnProperty(d);a=a.superclass){}}a[d]=c;c.owner=a}return c||null}}});Ext.ns("Ext.core");Ext.dom.Query=Ext.core.DomQuery=Ext.DomQuery=(function(){var DQ,doc=document,cache={},simpleCache={},valueCache={},useClassList=!!doc.documentElement.classList,useElementPointer=!!doc.documentElement.firstElementChild,useChildrenCollection=(function(){var d=doc.createElement("div");d.innerHTML="<!-- -->text<!-- -->";return d.children&&(d.children.length===0)})(),nonSpace=/\S/,trimRe=/^\s+|\s+$/g,tplRe=/\{(\d+)\}/g,modeRe=/^(\s?[\/>+~]\s?|\s|$)/,tagTokenRe=/^(#)?([\w\-\*\|\\]+)/,nthRe=/(\d*)n\+?(\d*)/,nthRe2=/\D/,startIdRe=/^\s*#/,isIE=window.ActiveXObject?true:false,key=30803,longHex=/\\([0-9a-fA-F]{6})/g,shortHex=/\\([0-9a-fA-F]{1,6})\s{0,1}/g,nonHex=/\\([^0-9a-fA-F]{1})/g,escapes=/\\/g,num,hasEscapes,supportsColonNsSeparator=(function(){var xmlDoc,xmlString='<r><a:b xmlns:a="n"></a:b></r>';if(window.DOMParser){xmlDoc=(new DOMParser()).parseFromString(xmlString,"application/xml")}else{xmlDoc=new ActiveXObject("Microsoft.XMLDOM");xmlDoc.loadXML(xmlString)}return !!xmlDoc.getElementsByTagName("a:b").length})(),longHexToChar=function($0,$1){return String.fromCharCode(parseInt($1,16))},shortToLongHex=function($0,$1){while($1.length<6){$1="0"+$1}return"\\"+$1},charToLongHex=function($0,$1){num=$1.charCodeAt(0).toString(16);if(num.length===1){num="0"+num}return"\\0000"+num},unescapeCssSelector=function(selector){return(hasEscapes)?selector.replace(longHex,longHexToChar):selector},setupEscapes=function(path){hasEscapes=(path.indexOf("\\")>-1);if(hasEscapes){path=path.replace(shortHex,shortToLongHex).replace(nonHex,charToLongHex).replace(escapes,"\\\\")}return path};eval("var batch = 30803, child, next, prev, byClassName;");child=useChildrenCollection?function child(parent,index){return parent.children[index]}:function child(parent,index){var i=0,n=parent.firstChild;while(n){if(n.nodeType==1){if(++i==index){return n}}n=n.nextSibling}return null};next=useElementPointer?function(n){return n.nextElementSibling}:function(n){while((n=n.nextSibling)&&n.nodeType!=1){}return n};prev=useElementPointer?function(n){return n.previousElementSibling}:function(n){while((n=n.previousSibling)&&n.nodeType!=1){}return n};function children(parent){var n=parent.firstChild,nodeIndex=-1,nextNode;while(n){nextNode=n.nextSibling;if(n.nodeType==3&&!nonSpace.test(n.nodeValue)){parent.removeChild(n)}else{n.nodeIndex=++nodeIndex}n=nextNode}return this}byClassName=useClassList?function(nodeSet,cls){cls=unescapeCssSelector(cls);if(!cls){return nodeSet}var result=[],ri=-1,i,ci,classList;for(i=0;ci=nodeSet[i];i++){classList=ci.classList;if(classList){if(classList.contains(cls)){result[++ri]=ci}}else{if((" "+ci.className+" ").indexOf(cls)!==-1){result[++ri]=ci}}}return result}:function(nodeSet,cls){cls=unescapeCssSelector(cls);if(!cls){return nodeSet}var result=[],ri=-1,i,ci;for(i=0;ci=nodeSet[i];i++){if((" "+ci.className+" ").indexOf(cls)!==-1){result[++ri]=ci}}return result};function attrValue(n,attr){if(!n.tagName&&typeof n.length!="undefined"){n=n[0]}if(!n){return null}if(attr=="for"){return n.htmlFor}if(attr=="class"||attr=="className"){return n.className}return n.getAttribute(attr)||n[attr]}function getNodes(ns,mode,tagName){var result=[],ri=-1,cs,i,ni,j,ci,cn,utag,n,cj;if(!ns){return result}tagName=tagName.replace("|",":")||"*";if(typeof ns.getElementsByTagName!="undefined"){ns=[ns]}if(!mode){tagName=unescapeCssSelector(tagName);if(!supportsColonNsSeparator&&DQ.isXml(ns[0])&&tagName.indexOf(":")!==-1){for(i=0;ni=ns[i];i++){cs=ni.getElementsByTagName(tagName.split(":").pop());for(j=0;ci=cs[j];j++){if(ci.tagName===tagName){result[++ri]=ci}}}}else{for(i=0;ni=ns[i];i++){cs=ni.getElementsByTagName(tagName);for(j=0;ci=cs[j];j++){result[++ri]=ci}}}}else{if(mode=="/"||mode==">"){utag=tagName.toUpperCase();for(i=0;ni=ns[i];i++){cn=ni.childNodes;for(j=0;cj=cn[j];j++){if(cj.nodeName==utag||cj.nodeName==tagName||tagName=="*"){result[++ri]=cj}}}}else{if(mode=="+"){utag=tagName.toUpperCase();for(i=0;n=ns[i];i++){while((n=n.nextSibling)&&n.nodeType!=1){}if(n&&(n.nodeName==utag||n.nodeName==tagName||tagName=="*")){result[++ri]=n}}}else{if(mode=="~"){utag=tagName.toUpperCase();for(i=0;n=ns[i];i++){while((n=n.nextSibling)){if(n.nodeName==utag||n.nodeName==tagName||tagName=="*"){result[++ri]=n}}}}}}}return result}function concat(a,b){a.push.apply(a,b);return a}function byTag(cs,tagName){if(cs.tagName||cs===doc){cs=[cs]}if(!tagName){return cs}var result=[],ri=-1,i,ci;tagName=tagName.toLowerCase();for(i=0;ci=cs[i];i++){if(ci.nodeType==1&&ci.tagName.toLowerCase()==tagName){result[++ri]=ci}}return result}function byId(cs,id){id=unescapeCssSelector(id);if(cs.tagName||cs===doc){cs=[cs]}if(!id){return cs}var result=[],ri=-1,i,ci;for(i=0;ci=cs[i];i++){if(ci&&ci.id==id){result[++ri]=ci;return result}}return result}function byAttribute(cs,attr,value,op,custom){var result=[],ri=-1,useGetStyle=custom=="{",fn=DQ.operators[op],a,xml,hasXml,i,ci;value=unescapeCssSelector(value);for(i=0;ci=cs[i];i++){if(ci.nodeType===1){if(!hasXml){xml=DQ.isXml(ci);hasXml=true}if(!xml){if(useGetStyle){a=DQ.getStyle(ci,attr)}else{if(attr=="class"||attr=="className"){a=ci.className}else{if(attr=="for"){a=ci.htmlFor}else{if(attr=="href"){a=ci.getAttribute("href",2)}else{a=ci.getAttribute(attr)}}}}}else{a=ci.getAttribute(attr)}if((fn&&fn(a,value))||(!fn&&a)){result[++ri]=ci}}}return result}function byPseudo(cs,name,value){value=unescapeCssSelector(value);return DQ.pseudos[name](cs,value)}function nodupIEXml(cs){var d=++key,r,i,len,c;cs[0].setAttribute("_nodup",d);r=[cs[0]];for(i=1,len=cs.length;i<len;i++){c=cs[i];if(!c.getAttribute("_nodup")!=d){c.setAttribute("_nodup",d);r[r.length]=c}}for(i=0,len=cs.length;i<len;i++){cs[i].removeAttribute("_nodup")}return r}function nodup(cs){if(!cs){return[]}var len=cs.length,c,i,r=cs,cj,ri=-1,d,j;if(!len||typeof cs.nodeType!="undefined"||len==1){return cs}if(isIE&&typeof cs[0].selectSingleNode!="undefined"){return nodupIEXml(cs)}d=++key;cs[0]._nodup=d;for(i=1;c=cs[i];i++){if(c._nodup!=d){c._nodup=d}else{r=[];for(j=0;j<i;j++){r[++ri]=cs[j]}for(j=i+1;cj=cs[j];j++){if(cj._nodup!=d){cj._nodup=d;r[++ri]=cj}}return r}}return r}function quickDiffIEXml(c1,c2){var d=++key,r=[],i,len;for(i=0,len=c1.length;i<len;i++){c1[i].setAttribute("_qdiff",d)}for(i=0,len=c2.length;i<len;i++){if(c2[i].getAttribute("_qdiff")!=d){r[r.length]=c2[i]}}for(i=0,len=c1.length;i<len;i++){c1[i].removeAttribute("_qdiff")}return r}function quickDiff(c1,c2){var len1=c1.length,d=++key,r=[],i,len;if(!len1){return c2}if(isIE&&typeof c1[0].selectSingleNode!="undefined"){return quickDiffIEXml(c1,c2)}for(i=0;i<len1;i++){c1[i]._qdiff=d}for(i=0,len=c2.length;i<len;i++){if(c2[i]._qdiff!=d){r[r.length]=c2[i]}}return r}function quickId(ns,mode,root,id){if(ns==root){id=unescapeCssSelector(id);var d=root.ownerDocument||root;return d.getElementById(id)}ns=getNodes(ns,mode,"*");return byId(ns,id)}return DQ={getStyle:function(el,name){return Ext.fly(el,"_DomQuery").getStyle(name)},compile:function(path,type){type=type||"select";var fn=["var f = function(root) {\n var mode; ++batch; var n = root || document;\n"],lastPath,matchers=DQ.matchers,matchersLn=matchers.length,modeMatch,lmode=path.match(modeRe),tokenMatch,matched,j,t,m;path=setupEscapes(path);if(lmode&&lmode[1]){fn[fn.length]='mode="'+lmode[1].replace(trimRe,"")+'";';path=path.replace(lmode[1],"")}while(path.substr(0,1)=="/"){path=path.substr(1)}while(path&&lastPath!=path){lastPath=path;tokenMatch=path.match(tagTokenRe);if(type=="select"){if(tokenMatch){if(tokenMatch[1]=="#"){fn[fn.length]='n = quickId(n, mode, root, "'+tokenMatch[2]+'");'}else{fn[fn.length]='n = getNodes(n, mode, "'+tokenMatch[2]+'");'}path=path.replace(tokenMatch[0],"")}else{if(path.substr(0,1)!="@"){fn[fn.length]='n = getNodes(n, mode, "*");'}}}else{if(tokenMatch){if(tokenMatch[1]=="#"){fn[fn.length]='n = byId(n, "'+tokenMatch[2]+'");'}else{fn[fn.length]='n = byTag(n, "'+tokenMatch[2]+'");'}path=path.replace(tokenMatch[0],"")}}while(!(modeMatch=path.match(modeRe))){matched=false;for(j=0;j<matchersLn;j++){t=matchers[j];m=path.match(t.re);if(m){fn[fn.length]=t.select.replace(tplRe,function(x,i){return m[i]});path=path.replace(m[0],"");matched=true;break}}if(!matched){Ext.Error.raise({sourceClass:"Ext.DomQuery",sourceMethod:"compile",msg:'Error parsing selector. Parsing failed at "'+path+'"'})}}if(modeMatch[1]){fn[fn.length]='mode="'+modeMatch[1].replace(trimRe,"")+'";';path=path.replace(modeMatch[1],"")}}fn[fn.length]="return nodup(n);\n}";eval(fn.join(""));return f},jsSelect:function(path,root,type){root=root||doc;if(typeof root=="string"){root=doc.getElementById(root)}var paths=path.split(","),results=[],i,len,subPath,result;for(i=0,len=paths.length;i<len;i++){subPath=paths[i].replace(trimRe,"");if(!cache[subPath]){cache[subPath]=DQ.compile(subPath,type);if(!cache[subPath]){Ext.Error.raise({sourceClass:"Ext.DomQuery",sourceMethod:"jsSelect",msg:subPath+" is not a valid selector"})}}else{setupEscapes(subPath)}result=cache[subPath](root);if(result&&result!==doc){results=results.concat(result)}}if(paths.length>1){return nodup(results)}return results},isXml:function(el){var docEl=(el?el.ownerDocument||el:0).documentElement;return docEl?docEl.nodeName!=="HTML":false},select:doc.querySelectorAll?function(path,root,type,single){root=root||doc;if(!DQ.isXml(root)){try{if(root.parentNode&&(root.nodeType!==9)&&path.indexOf(",")===-1&&!startIdRe.test(path)){path="#"+Ext.escapeId(Ext.id(root))+" "+path;root=root.parentNode}return single?[root.querySelector(path)]:Ext.Array.toArray(root.querySelectorAll(path))}catch(e){}}return DQ.jsSelect.call(this,path,root,type)}:function(path,root,type){return DQ.jsSelect.call(this,path,root,type)},selectNode:function(path,root){return Ext.DomQuery.select(path,root,null,true)[0]},selectValue:function(path,root,defaultValue){path=path.replace(trimRe,"");if(!valueCache[path]){valueCache[path]=DQ.compile(path,"select")}else{setupEscapes(path)}var n=valueCache[path](root),v;n=n[0]?n[0]:n;if(typeof n.normalize=="function"){n.normalize()}v=(n&&n.firstChild?n.firstChild.nodeValue:null);return((v===null||v===undefined||v==="")?defaultValue:v)},selectNumber:function(path,root,defaultValue){var v=DQ.selectValue(path,root,defaultValue||0);return parseFloat(v)},is:function(el,ss){if(typeof el=="string"){el=doc.getElementById(el)}var isArray=Ext.isArray(el),result=DQ.filter(isArray?el:[el],ss);return isArray?(result.length==el.length):(result.length>0)},filter:function(els,ss,nonMatches){ss=ss.replace(trimRe,"");if(!simpleCache[ss]){simpleCache[ss]=DQ.compile(ss,"simple")}else{setupEscapes(ss)}var result=simpleCache[ss](els);return nonMatches?quickDiff(result,els):result},matchers:[{re:/^\.([\w\-\\]+)/,select:useClassList?'n = byClassName(n, "{1}");':'n = byClassName(n, " {1} ");'},{re:/^\:([\w\-]+)(?:\(((?:[^\s>\/]*|.*?))\))?/,select:'n = byPseudo(n, "{1}", "{2}");'},{re:/^(?:([\[\{])(?:@)?([\w\-]+)\s?(?:(=|.=)\s?['"]?(.*?)["']?)?[\]\}])/,select:'n = byAttribute(n, "{2}", "{4}", "{3}", "{1}");'},{re:/^#([\w\-\\]+)/,select:'n = byId(n, "{1}");'},{re:/^@([\w\-\.]+)/,select:'return {firstChild:{nodeValue:attrValue(n, "{1}")}};'}],operators:{"=":function(a,v){return a==v},"!=":function(a,v){return a!=v},"^=":function(a,v){return a&&a.substr(0,v.length)==v},"$=":function(a,v){return a&&a.substr(a.length-v.length)==v},"*=":function(a,v){return a&&a.indexOf(v)!==-1},"%=":function(a,v){return(a%v)==0},"|=":function(a,v){return a&&(a==v||a.substr(0,v.length+1)==v+"-")},"~=":function(a,v){return a&&(" "+a+" ").indexOf(" "+v+" ")!=-1}},pseudos:{"first-child":function(c){var r=[],ri=-1,n,i,ci;for(i=0;(ci=n=c[i]);i++){while((n=n.previousSibling)&&n.nodeType!=1){}if(!n){r[++ri]=ci}}return r},"last-child":function(c){var r=[],ri=-1,n,i,ci;for(i=0;(ci=n=c[i]);i++){while((n=n.nextSibling)&&n.nodeType!=1){}if(!n){r[++ri]=ci}}return r},"nth-child":function(c,a){var r=[],ri=-1,m=nthRe.exec(a=="even"&&"2n"||a=="odd"&&"2n+1"||!nthRe2.test(a)&&"n+"+a||a),f=(m[1]||1)-0,l=m[2]-0,i,n,j,cn,pn;for(i=0;n=c[i];i++){pn=n.parentNode;if(batch!=pn._batch){j=0;for(cn=pn.firstChild;cn;cn=cn.nextSibling){if(cn.nodeType==1){cn.nodeIndex=++j}}pn._batch=batch}if(f==1){if(l==0||n.nodeIndex==l){r[++ri]=n}}else{if((n.nodeIndex+l)%f==0){r[++ri]=n}}}return r},"only-child":function(c){var r=[],ri=-1,i,ci;for(i=0;ci=c[i];i++){if(!prev(ci)&&!next(ci)){r[++ri]=ci}}return r},empty:function(c){var r=[],ri=-1,i,ci,cns,j,cn,empty;for(i=0;ci=c[i];i++){cns=ci.childNodes;j=0;empty=true;while(cn=cns[j]){++j;if(cn.nodeType==1||cn.nodeType==3){empty=false;break}}if(empty){r[++ri]=ci}}return r},contains:function(c,v){var r=[],ri=-1,i,ci;for(i=0;ci=c[i];i++){if((ci.textContent||ci.innerText||ci.text||"").indexOf(v)!=-1){r[++ri]=ci}}return r},nodeValue:function(c,v){var r=[],ri=-1,i,ci;for(i=0;ci=c[i];i++){if(ci.firstChild&&ci.firstChild.nodeValue==v){r[++ri]=ci}}return r},checked:function(c){var r=[],ri=-1,i,ci;for(i=0;ci=c[i];i++){if(ci.checked==true){r[++ri]=ci}}return r},not:function(c,ss){return DQ.filter(c,ss,true)},any:function(c,selectors){var ss=selectors.split("|"),r=[],ri=-1,s,i,ci,j;for(i=0;ci=c[i];i++){for(j=0;s=ss[j];j++){if(DQ.is(ci,s)){r[++ri]=ci;break}}}return r},odd:function(c){return this["nth-child"](c,"odd")},even:function(c){return this["nth-child"](c,"even")},nth:function(c,a){return c[a-1]||[]},first:function(c){return c[0]||[]},last:function(c){return c[c.length-1]||[]},has:function(c,ss){var s=DQ.select,r=[],ri=-1,i,ci;for(i=0;ci=c[i];i++){if(s(ss,ci).length>0){r[++ri]=ci}}return r},next:function(c,ss){var is=DQ.is,r=[],ri=-1,i,ci,n;for(i=0;ci=c[i];i++){n=next(ci);if(n&&is(n,ss)){r[++ri]=ci}}return r},prev:function(c,ss){var is=DQ.is,r=[],ri=-1,i,ci,n;for(i=0;ci=c[i];i++){n=prev(ci);if(n&&is(n,ss)){r[++ri]=ci}}return r},focusable:function(candidates){var len=candidates.length,results=[],i=0,c;for(;i<len;i++){c=candidates[i];if(Ext.fly(c,"_DomQuery").isFocusable()){results.push(c)}}return results},visible:function(candidates,deep){var len=candidates.length,results=[],i=0,c;for(;i<len;i++){c=candidates[i];if(Ext.fly(c,"_DomQuery").isVisible(deep)){results.push(c)}}return results}}}}());Ext.query=Ext.DomQuery.select;Ext.define("Ext.dom.Element_anim",{override:"Ext.dom.Element",animate:function(b){var d=this,c,e,a=d.dom.id||Ext.id(d.dom);if(!Ext.fx.Manager.hasFxBlock(a)){if(b.listeners){c=b.listeners;delete b.listeners}if(b.internalListeners){b.listeners=b.internalListeners;delete b.internalListeners}e=new Ext.fx.Anim(d.anim(b));if(c){e.on(c)}Ext.fx.Manager.queueFx(e)}return d},anim:function(a){if(!Ext.isObject(a)){return(a)?{}:false}var b=this,c=a.duration||Ext.fx.Anim.prototype.duration,e=a.easing||"ease",d;if(a.stopAnimation){b.stopAnimation()}Ext.applyIf(a,Ext.fx.Manager.getFxDefaults(b.id));Ext.fx.Manager.setFxDefaults(b.id,{delay:0});d={target:b.dom,remove:a.remove,alternate:a.alternate||false,duration:c,easing:e,callback:a.callback,listeners:a.listeners,iterations:a.iterations||1,scope:a.scope,block:a.block,concurrent:a.concurrent,delay:a.delay||0,paused:true,keyframes:a.keyframes,from:a.from||{},to:Ext.apply({},a)};Ext.apply(d.to,a.to);delete d.to.to;delete d.to.from;delete d.to.remove;delete d.to.alternate;delete d.to.keyframes;delete d.to.iterations;delete d.to.listeners;delete d.to.target;delete d.to.paused;delete d.to.callback;delete d.to.scope;delete d.to.duration;delete d.to.easing;delete d.to.concurrent;delete d.to.block;delete d.to.stopAnimation;delete d.to.delay;return d},slideIn:function(d,c,e){var h=this,b=h.dom,k=b.style,j,a,g,i;d=d||"t";c=c||{};j=function(){var p=this,o=c.listeners,n=Ext.fly(b,"_anim"),q,l,r,m;if(!e){n.fixDisplay()}q=n.getBox();if((d=="t"||d=="b")&&q.height===0){q.height=b.scrollHeight}else{if((d=="l"||d=="r")&&q.width===0){q.width=b.scrollWidth}}l=n.getStyles("width","height","left","right","top","bottom","position","z-index",true);n.setSize(q.width,q.height);if(c.preserveScroll){g=n.cacheScrollValues()}m=n.wrap({id:Ext.id()+"-anim-wrap-for-"+n.dom.id,style:{visibility:e?"visible":"hidden"}});i=m.dom.parentNode;m.setPositioning(n.getPositioning(true));if(m.isStyle("position","static")){m.position("relative")}n.clearPositioning("auto");m.clip();if(g){g()}n.setStyle({visibility:"",position:"absolute"});if(e){m.setSize(q.width,q.height)}switch(d){case"t":r={from:{width:q.width+"px",height:"0px"},to:{width:q.width+"px",height:q.height+"px"}};k.bottom="0px";break;case"l":r={from:{width:"0px",height:q.height+"px"},to:{width:q.width+"px",height:q.height+"px"}};h.anchorAnimX(d);break;case"r":r={from:{x:q.x+q.width,width:"0px",height:q.height+"px"},to:{x:q.x,width:q.width+"px",height:q.height+"px"}};h.anchorAnimX(d);break;case"b":r={from:{y:q.y+q.height,width:q.width+"px",height:"0px"},to:{y:q.y,width:q.width+"px",height:q.height+"px"}};break;case"tl":r={from:{x:q.x,y:q.y,width:"0px",height:"0px"},to:{width:q.width+"px",height:q.height+"px"}};k.bottom="0px";h.anchorAnimX("l");break;case"bl":r={from:{y:q.y+q.height,width:"0px",height:"0px"},to:{y:q.y,width:q.width+"px",height:q.height+"px"}};h.anchorAnimX("l");break;case"br":r={from:{x:q.x+q.width,y:q.y+q.height,width:"0px",height:"0px"},to:{x:q.x,y:q.y,width:q.width+"px",height:q.height+"px"}};h.anchorAnimX("r");break;case"tr":r={from:{x:q.x+q.width,width:"0px",height:"0px"},to:{x:q.x,width:q.width+"px",height:q.height+"px"}};k.bottom="0px";h.anchorAnimX("r");break}m.show();a=Ext.apply({},c);delete a.listeners;a=new Ext.fx.Anim(Ext.applyIf(a,{target:m,duration:500,easing:"ease-out",from:e?r.to:r.from,to:e?r.from:r.to}));a.on("afteranimate",function(){var s=Ext.fly(b,"_anim");s.setStyle(l);if(e){if(c.useDisplay){s.setDisplayed(false)}else{s.hide()}}if(m.dom){if(m.dom.parentNode){m.dom.parentNode.insertBefore(s.dom,m.dom)}else{i.appendChild(s.dom)}m.remove()}if(g){g()}p.end()});if(o){a.on(o)}};h.animate({duration:c.duration?Math.max(c.duration,500)*2:1000,listeners:{beforeanimate:j}});return h},slideOut:function(a,b){return this.slideIn(a,b,true)},puff:function(e){var d=this,g=d.dom,b,c=d.getBox(),a=d.getStyles("width","height","left","right","top","bottom","position","z-index","font-size","opacity",true);e=Ext.applyIf(e||{},{easing:"ease-out",duration:500,useDisplay:false});b=function(){var h=Ext.fly(g,"_anim");h.clearOpacity();h.show();this.to={width:c.width*2,height:c.height*2,x:c.x-(c.width/2),y:c.y-(c.height/2),opacity:0,fontSize:"200%"};this.on("afteranimate",function(){var i=Ext.fly(g,"_anim");if(i){if(e.useDisplay){i.setDisplayed(false)}else{i.hide()}i.setStyle(a);Ext.callback(e.callback,e.scope)}})};d.animate({duration:e.duration,easing:e.easing,listeners:{beforeanimate:{fn:b}}});return d},switchOff:function(c){var b=this,d=b.dom,a;c=Ext.applyIf(c||{},{easing:"ease-in",duration:500,remove:false,useDisplay:false});a=function(){var j=Ext.fly(d,"_anim"),i=this,h=j.getSize(),k=j.getXY(),g,e;j.clearOpacity();j.clip();e=j.getPositioning();g=new Ext.fx.Animator({target:d,duration:c.duration,easing:c.easing,keyframes:{33:{opacity:0.3},66:{height:1,y:k[1]+h.height/2},100:{width:1,x:k[0]+h.width/2}}});g.on("afteranimate",function(){var l=Ext.fly(d,"_anim");if(c.useDisplay){l.setDisplayed(false)}else{l.hide()}l.clearOpacity();l.setPositioning(e);l.setSize(h);i.end()})};b.animate({duration:(Math.max(c.duration,500)*2),listeners:{beforeanimate:{fn:a}}});return b},frame:function(a,d,e){var c=this,g=c.dom,b;a=a||"#C3DAF9";d=d||1;e=e||{};b=function(){var k=Ext.fly(g,"_anim"),j=this,l,i,h;k.show();l=k.getBox();i=Ext.getBody().createChild({id:k.dom.id+"-anim-proxy",style:{position:"absolute","pointer-events":"none","z-index":35000,border:"0px solid "+a}});h=new Ext.fx.Anim({target:i,duration:e.duration||1000,iterations:d,from:{top:l.y,left:l.x,borderWidth:0,opacity:1,height:l.height,width:l.width},to:{top:l.y-20,left:l.x-20,borderWidth:10,opacity:0,height:l.height+40,width:l.width+40}});h.on("afteranimate",function(){i.remove();j.end()})};c.animate({duration:(Math.max(e.duration,500)*2)||2000,listeners:{beforeanimate:{fn:b}}});return c},ghost:function(a,d){var c=this,e=c.dom,b;a=a||"b";b=function(){var j=Ext.fly(e,"_anim"),i=j.getWidth(),h=j.getHeight(),k=j.getXY(),g=j.getPositioning(),l={opacity:0};switch(a){case"t":l.y=k[1]-h;break;case"l":l.x=k[0]-i;break;case"r":l.x=k[0]+i;break;case"b":l.y=k[1]+h;break;case"tl":l.x=k[0]-i;l.y=k[1]-h;break;case"bl":l.x=k[0]-i;l.y=k[1]+h;break;case"br":l.x=k[0]+i;l.y=k[1]+h;break;case"tr":l.x=k[0]+i;l.y=k[1]-h;break}this.to=l;this.on("afteranimate",function(){var m=Ext.fly(e,"_anim");if(m){m.hide();m.clearOpacity();m.setPositioning(g)}})};c.animate(Ext.applyIf(d||{},{duration:500,easing:"ease-out",listeners:{beforeanimate:b}}));return c},highlight:function(d,b){var i=this,e=i.dom,k={},h,l,g,c,a,j;if(e.tagName.match(i.tableTagRe)){return i.select("div").highlight(d,b)}b=b||{};c=b.listeners||{};g=b.attr||"backgroundColor";k[g]=d||"ffff9c";if(!b.to){l={};l[g]=b.endColor||i.getColor(g,"ffffff","")}else{l=b.to}b.listeners=Ext.apply(Ext.apply({},c),{beforeanimate:function(){h=e.style[g];var m=Ext.fly(e,"_anim");m.clearOpacity();m.show();a=c.beforeanimate;if(a){j=a.fn||a;return j.apply(a.scope||c.scope||window,arguments)}},afteranimate:function(){if(e){e.style[g]=h}a=c.afteranimate;if(a){j=a.fn||a;j.apply(a.scope||c.scope||window,arguments)}}});i.animate(Ext.apply({},b,{duration:1000,easing:"ease-in",from:k,to:l}));return i},pause:function(a){var b=this;Ext.fx.Manager.setFxDefaults(b.id,{delay:a});return b},fadeIn:function(c){var a=this,b=a.dom;a.animate(Ext.apply({},c,{opacity:1,internalListeners:{beforeanimate:function(e){var d=Ext.fly(b,"_anim");if(d.isStyle("display","none")){d.setDisplayed("")}else{d.show()}}}}));return this},fadeOut:function(c){var a=this,b=a.dom;c=Ext.apply({opacity:0,internalListeners:{afteranimate:function(e){if(b&&e.to.opacity===0){var d=Ext.fly(b,"_anim");if(c.useDisplay){d.setDisplayed(false)}else{d.hide()}}}}},c);a.animate(c);return a},scale:function(a,b,c){this.animate(Ext.apply({},c,{width:a,height:b}));return this},shift:function(a){this.animate(a);return this},anchorAnimX:function(a){var b=(a==="l")?"right":"left";this.dom.style[b]="0px"}});Ext.define("Ext.dom.Element_dd",{override:"Ext.dom.Element",initDD:function(c,b,d){var a=new Ext.dd.DD(Ext.id(this.dom),c,b);return Ext.apply(a,d)},initDDProxy:function(c,b,d){var a=new Ext.dd.DDProxy(Ext.id(this.dom),c,b);return Ext.apply(a,d)},initDDTarget:function(c,b,d){var a=new Ext.dd.DDTarget(Ext.id(this.dom),c,b);return Ext.apply(a,d)}});Ext.define("Ext.dom.Element_fx",{override:"Ext.dom.Element"},function(){var b=Ext.dom.Element,i="visibility",g="display",n="none",e="hidden",m="visible",o="offsets",j="asclass",a="nosize",c="originalDisplay",d="visibilityMode",h="isVisible",l=Ext.baseCSSPrefix+"hide-offsets",k=function(q){var r=(q.$cache||q.getCache()).data,s=r[c];if(s===undefined){r[c]=s=""}return s},p=function(r){var s=(r.$cache||r.getCache()).data,q=s[d];if(q===undefined){s[d]=q=b.VISIBILITY}return q};b.override({originalDisplay:"",visibilityMode:1,setVisible:function(u,q){var s=this,t=s.dom,r=p(s);if(typeof q=="string"){switch(q){case g:r=b.DISPLAY;break;case i:r=b.VISIBILITY;break;case o:r=b.OFFSETS;break;case a:case j:r=b.ASCLASS;break}s.setVisibilityMode(r);q=false}if(!q||!s.anim){if(r==b.DISPLAY){return s.setDisplayed(u)}else{if(r==b.OFFSETS){s[u?"removeCls":"addCls"](l)}else{if(r==b.VISIBILITY){s.fixDisplay();t.style.visibility=u?"":e}else{if(r==b.ASCLASS){s[u?"removeCls":"addCls"](s.visibilityCls||b.visibilityCls)}}}}}else{if(u){s.setOpacity(0.01);s.setVisible(true)}if(!Ext.isObject(q)){q={duration:350,easing:"ease-in"}}s.animate(Ext.applyIf({callback:function(){if(!u){Ext.fly(t,"_internal").setVisible(false).setOpacity(1)}},to:{opacity:(u)?1:0}},q))}(s.$cache||s.getCache()).data[h]=u;return s},hasMetrics:function(){var q=p(this);return this.isVisible()||(q==b.OFFSETS)||(q==b.VISIBILITY)},toggle:function(q){var r=this;r.setVisible(!r.isVisible(),r.anim(q));return r},setDisplayed:function(q){if(typeof q=="boolean"){q=q?k(this):n}this.setStyle(g,q);return this},fixDisplay:function(){var q=this;if(q.isStyle(g,n)){q.setStyle(i,e);q.setStyle(g,k(q));if(q.isStyle(g,n)){q.setStyle(g,"block")}}},hide:function(q){if(typeof q=="string"){this.setVisible(false,q);return this}this.setVisible(false,this.anim(q));return this},show:function(q){if(typeof q=="string"){this.setVisible(true,q);return this}this.setVisible(true,this.anim(q));return this}})});Ext.define("Ext.dom.Element_position",{override:"Ext.dom.Element"},function(){var x,q=this,m="left",j="right",p="top",h="bottom",n="position",i="static",y="relative",u="z-index",t="BODY",c="padding",s="border",r="-left",l="-right",a="-top",k="-bottom",g="-width",e={l:s+r+g,r:s+l+g,t:s+a+g,b:s+k+g},d={l:c+r,r:c+l,t:c+a,b:c+k},v=[d.l,d.r,d.t,d.b],b=[e.l,e.r,e.t,e.b],w=Math.round,z=document,o=function(A){if(!x){x=new Ext.Element.Fly()}x.attach(A);return x};q.override({pxRe:/^\d+(?:\.\d*)?px$/i,inheritableStatics:{getX:function(A){return q.getXY(A)[0]},getXY:function(C){var F=z.body,B=z.documentElement,A=0,D=0,G=[0,0],E,I;C=Ext.getDom(C);if(C!=z&&C!=F){if(Ext.isIE){try{E=C.getBoundingClientRect();D=B.clientTop||F.clientTop;A=B.clientLeft||F.clientLeft}catch(H){E={left:0,top:0}}}else{E=C.getBoundingClientRect()}I=o(z).getScroll();G=[w(E.left+I.left-A),w(E.top+I.top-D)]}return G},getY:function(A){return q.getXY(A)[1]},setX:function(B,A){q.setXY(B,[A,false])},setXY:function(B,C){(B=Ext.fly(B,"_setXY")).position();var D=B.translatePoints(C),A=B.dom.style,E;A.right="auto";for(E in D){if(!isNaN(D[E])){A[E]=D[E]+"px"}}},setY:function(A,B){q.setXY(A,[false,B])}},center:function(A){return this.alignTo(A||z,"c-c")},clearPositioning:function(A){A=A||"";return this.setStyle({left:A,right:A,top:A,bottom:A,"z-index":"",position:i})},getAnchorToXY:function(D,A,C,B){return D.getAnchorXY(A,C,B)},getBottom:function(A){return(A?this.getLocalY():this.getY())+this.getHeight()},getBorderPadding:function(){var A=this.getStyle(v),B=this.getStyle(b);return{beforeX:(parseFloat(B[e.l])||0)+(parseFloat(A[d.l])||0),afterX:(parseFloat(B[e.r])||0)+(parseFloat(A[d.r])||0),beforeY:(parseFloat(B[e.t])||0)+(parseFloat(A[d.t])||0),afterY:(parseFloat(B[e.b])||0)+(parseFloat(A[d.b])||0)}},getCenterXY:function(){return this.getAlignToXY(z,"c-c")},getLeft:function(A){return A?this.getLocalX():this.getX()},getLocalX:function(){var C=this,B=C.dom.offsetParent,A=C.getStyle("left");if(!A||A==="auto"){A=0}else{if(C.pxRe.test(A)){A=parseFloat(A)}else{A=C.getX();if(B){A-=q.getX(B)}}}return A},getLocalXY:function(){var D=this,C=D.dom.offsetParent,B=D.getStyle(["left","top"]),A=B.left,E=B.top;if(!A||A==="auto"){A=0}else{if(D.pxRe.test(A)){A=parseFloat(A)}else{A=D.getX();if(C){A-=q.getX(C)}}}if(!E||E==="auto"){E=0}else{if(D.pxRe.test(E)){E=parseFloat(E)}else{E=D.getY();if(C){E-=q.getY(C)}}}return[A,E]},getLocalY:function(){var B=this,A=B.dom.offsetParent,C=B.getStyle("top");if(!C||C==="auto"){C=0}else{if(B.pxRe.test(C)){C=parseFloat(C)}else{C=B.getY();if(A){C-=q.getY(A)}}}return C},getPageBox:function(C){var F=this,D=F.dom,H=D.nodeName==t,I=H?Ext.Element.getViewWidth():D.offsetWidth,E=H?Ext.Element.getViewHeight():D.offsetHeight,K=F.getXY(),J=K[1],A=K[0]+I,G=K[1]+E,B=K[0];if(C){return new Ext.util.Region(J,A,G,B)}else{return{left:B,top:J,width:I,height:E,right:A,bottom:G}}},getPositioning:function(B){var A=this.getStyle(["left","top","position","z-index"]),C=this.dom;if(B){if(A.left==="auto"){A.left=C.offsetLeft+"px"}if(A.top==="auto"){A.top=C.offsetTop+"px"}}return A},getRight:function(A){return(A?this.getLocalX():this.getX())+this.getWidth()},getTop:function(A){return A?this.getLocalY():this.getY()},getX:function(){return q.getX(this.dom)},getXY:function(){return q.getXY(this.dom)},getY:function(){return q.getY(this.dom)},moveTo:function(A,C,B){return this.setXY([A,C],B)},position:function(E,D,A,C){var B=this;if(!E&&B.isStyle(n,i)){B.setStyle(n,y)}else{if(E){B.setStyle(n,E)}}if(D){B.setStyle(u,D)}if(A||C){B.setXY([A||false,C||false])}},setBottom:function(A){this.dom.style[h]=this.addUnits(A);return this},setBounds:function(B,E,D,A,C){return this.setBox({x:B,y:E,width:D,height:A},C)},setLeft:function(A){this.dom.style[m]=this.addUnits(A);return this},setLeftTop:function(D,C){var B=this,A=B.dom.style;A.left=B.addUnits(D);A.top=B.addUnits(C);return B},setLocalX:function(A){var B=this.dom.style;B.right="auto";B.left=(A===null)?"auto":A+"px"},setLocalXY:function(A,C){var B=this.dom.style;B.right="auto";if(A&&A.length){C=A[1];A=A[0]}if(A===null){B.left="auto"}else{if(A!==undefined){B.left=A+"px"}}if(C===null){B.top="auto"}else{if(C!==undefined){B.top=C+"px"}}},setLocalY:function(A){this.dom.style.top=(A===null)?"auto":A+"px"},setLocation:function(A,C,B){return this.setXY([A,C],B)},setPositioning:function(A){return this.setStyle(A)},setRight:function(A){this.dom.style[j]=this.addUnits(A);return this},setTop:function(A){this.dom.style[p]=this.addUnits(A);return this},setX:function(A,B){return this.setXY([A,this.getY()],B)},setXY:function(C,A){var B=this;if(!A||!B.anim){q.setXY(B.dom,C)}else{if(!Ext.isObject(A)){A={}}B.animate(Ext.applyIf({to:{x:C[0],y:C[1]}},A))}return this},setY:function(B,A){return this.setXY([this.getX(),B],A)}});q.getTrueXY=q.getXY});Ext.define("Ext.dom.Element_scroll",{override:"Ext.dom.Element",isScrollable:function(){var a=this.dom;return a.scrollHeight>a.clientHeight||a.scrollWidth>a.clientWidth},getScroll:function(){var c=this,h=c.dom,g=document,a=g.body,b=g.documentElement,e,d;if(h===g||h===a){e=b.scrollLeft||(a?a.scrollLeft:0);d=b.scrollTop||(a?a.scrollTop:0)}else{e=h.scrollLeft;d=h.scrollTop}return{left:e,top:d}},getScrollLeft:function(){var b=this.dom,a=document;if(b===a||b===a.body){return this.getScroll().left}else{return b.scrollLeft}},getScrollTop:function(){var b=this.dom,a=document;if(b===a||b===a.body){return this.getScroll().top}else{return b.scrollTop}},setScrollLeft:function(a){this.dom.scrollLeft=this.normalizeScrollLeft(a);return this},normalizeScrollLeft:Ext.identityFn,setScrollTop:function(a){this.dom.scrollTop=a;return this},scrollBy:function(b,a,c){var d=this,e=d.dom;if(b.length){c=a;a=b[1];b=b[0]}else{if(typeof b!="number"){c=a;a=b.y;b=b.x}}if(b){d.scrollTo("left",Math.max(Math.min(d.getScrollLeft()+b,e.scrollWidth-e.clientWidth),0),c)}if(a){d.scrollTo("top",Math.max(Math.min(e.scrollTop+a,e.scrollHeight-e.clientHeight),0),c)}return d},scrollTo:function(c,e,a){var g=/top/i.test(c),i="scroll"+(g?"Top":"Left"),d=this,h=d.dom,b,i;if(!g){e=d.normalizeScrollLeft(e)}if(!a||!d.anim){h[i]=e;h[i]=e}else{b={to:{}};b.to[i]=e;if(Ext.isObject(a)){Ext.applyIf(b,a)}d.animate(b)}return d},scrollIntoView:function(b,e,c){var l=this,j=l.dom,h=l.getOffsetsTo(b=Ext.getDom(b)||Ext.getBody().dom),g=h[0]+b.scrollLeft,m=h[1]+b.scrollTop,a=m+j.offsetHeight,n=g+j.offsetWidth,q=b.clientHeight,p=parseInt(b.scrollTop,10),d=parseInt(b.scrollLeft,10),i=p+q,o=d+b.clientWidth,k;if(c){c=Ext.apply({listeners:{afteranimate:function(){l.scrollChildFly.attach(j).highlight()}}},c)}if(j.offsetHeight>q||m<p){k=m}else{if(a>i){k=a-q}}if(k!=null){l.scrollChildFly.attach(b).scrollTo("top",k,c)}if(e!==false){k=null;if(j.offsetWidth>b.clientWidth||g<d){k=g}else{if(n>o){k=n-b.clientWidth}}if(k!=null){l.scrollChildFly.attach(b).scrollTo("left",k,c)}}return l},scrollChildIntoView:function(b,a){this.scrollChildFly.attach(Ext.getDom(b)).scrollIntoView(this,a)},scroll:function(m,b,d){if(!this.isScrollable()){return false}var e=this.dom,g=e.scrollLeft,p=e.scrollTop,n=e.scrollWidth,k=e.scrollHeight,i=e.clientWidth,a=e.clientHeight,c=false,o,j={l:Math.min(g+b,n-i),r:o=Math.max(g-b,0),t:Math.max(p-b,0),b:Math.min(p+b,k-a)};j.d=j.b;j.u=j.t;m=m.substr(0,1);if((o=j[m])>-1){c=true;this.scrollTo(m=="l"||m=="r"?"left":"top",o,this.anim(d))}return c}},function(){this.prototype.scrollChildFly=new this.Fly();this.prototype.scrolltoFly=new this.Fly()});Ext.define("Ext.dom.Element_style",{override:"Ext.dom.Element"},function(){var r=this,n=document.defaultView,p=/table-row|table-.*-group/,a="_internal",t="hidden",q="height",h="width",e="isClipped",j="overflow",m="overflow-x",l="overflow-y",u="originalClip",b=/#document|body/i,v,g,o,d,s,i,w;if(!n||!n.getComputedStyle){r.prototype.getStyle=function(B,A){var N=this,I=N.dom,L=typeof B!="string",k=N.styleHooks,y=B,z=y,H=1,D=A,M,E,x,C,G,J,F;if(L){x={};y=z[0];F=0;if(!(H=z.length)){return x}}if(!I||I.documentElement){return x||""}E=I.style;if(A){J=E}else{J=I.currentStyle;if(!J){D=true;J=E}}do{C=k[y];if(!C){k[y]=C={name:r.normalize(y)}}if(C.get){G=C.get(I,N,D,J)}else{M=C.name;if(C.canThrow){try{G=J[M]}catch(K){G=""}}else{G=J?J[M]:""}}if(!L){return G}x[y]=G;y=z[++F]}while(F<H);return x}}r.override({getHeight:function(z,x){var y=this,A=y.isStyle("display","none"),k,B;if(A){return 0}k=y.dom.offsetHeight;if(Ext.supports.Direct2DBug){B=y.adjustDirect2DDimension(q);if(x){k+=B}else{if(B>0&&B<0.5){k++}}}if(z){k-=y.getBorderWidth("tb")+y.getPadding("tb")}return(k<0)?0:k},getWidth:function(k,B){var z=this,C=z.dom,A=z.isStyle("display","none"),y,x,D;if(A){return 0}if(B&&Ext.supports.BoundingClientRect){y=C.getBoundingClientRect();x=(z.vertical&&!Ext.isIE9&&!Ext.supports.RotatedBoundingClientRect)?(y.bottom-y.top):(y.right-y.left)}else{x=C.offsetWidth}if(Ext.supports.Direct2DBug&&!z.vertical){D=z.adjustDirect2DDimension(h);if(B){x+=D}else{if(D>0&&D<0.5){x++}}}if(k){x-=z.getBorderWidth("lr")+z.getPadding("lr")}return(x<0)?0:x},setWidth:function(x,k){var y=this;x=y.adjustWidth(x);if(!k||!y.anim){y.dom.style.width=y.addUnits(x)}else{if(!Ext.isObject(k)){k={}}y.animate(Ext.applyIf({to:{width:x}},k))}return y},setHeight:function(k,x){var y=this;k=y.adjustHeight(k);if(!x||!y.anim){y.dom.style.height=y.addUnits(k)}else{if(!Ext.isObject(x)){x={}}y.animate(Ext.applyIf({to:{height:k}},x))}return y},applyStyles:function(k){Ext.DomHelper.applyStyles(this.dom,k);return this},setSize:function(y,k,x){var z=this;if(Ext.isObject(y)){x=k;k=y.height;y=y.width}y=z.adjustWidth(y);k=z.adjustHeight(k);if(!x||!z.anim){z.dom.style.width=z.addUnits(y);z.dom.style.height=z.addUnits(k)}else{if(x===true){x={}}z.animate(Ext.applyIf({to:{width:y,height:k}},x))}return z},getViewSize:function(){var y=this,z=y.dom,x=b.test(z.nodeName),k;if(x){k={width:r.getViewWidth(),height:r.getViewHeight()}}else{k={width:z.clientWidth,height:z.clientHeight}}return k},getSize:function(k){return{width:this.getWidth(k),height:this.getHeight(k)}},adjustWidth:function(k){var x=this,y=(typeof k=="number");if(y&&x.autoBoxAdjust&&!x.isBorderBox()){k-=(x.getBorderWidth("lr")+x.getPadding("lr"))}return(y&&k<0)?0:k},adjustHeight:function(k){var x=this,y=(typeof k=="number");if(y&&x.autoBoxAdjust&&!x.isBorderBox()){k-=(x.getBorderWidth("tb")+x.getPadding("tb"))}return(y&&k<0)?0:k},getColor:function(x,y,D){var A=this.getStyle(x),z=D||D===""?D:"#",C,k,B=0;if(!A||(/transparent|inherit/.test(A))){return y}if(/^r/.test(A)){A=A.slice(4,A.length-1).split(",");k=A.length;for(;B<k;B++){C=parseInt(A[B],10);z+=(C<16?"0":"")+C.toString(16)}}else{A=A.replace("#","");z+=A.length==3?A.replace(/^(\w)(\w)(\w)$/,"$1$1$2$2$3$3"):A}return(z.length>5?z.toLowerCase():y)},setOpacity:function(x,k){var y=this;if(!y.dom){return y}if(!k||!y.anim){y.setStyle("opacity",x)}else{if(typeof k!="object"){k={duration:350,easing:"ease-in"}}y.animate(Ext.applyIf({to:{opacity:x}},k))}return y},clearOpacity:function(){return this.setOpacity("")},adjustDirect2DDimension:function(y){var D=this,x=D.dom,B=D.getStyle("display"),A=x.style.display,E=x.style.position,C=y===h?0:1,k=x.currentStyle,z;if(B==="inline"){x.style.display="inline-block"}x.style.position=B.match(p)?"absolute":"static";z=(parseFloat(k[y])||parseFloat(k.msTransformOrigin.split(" ")[C])*2)%1;x.style.position=E;if(B==="inline"){x.style.display=A}return z},clip:function(){var x=this,y=(x.$cache||x.getCache()).data,k;if(!y[e]){y[e]=true;k=x.getStyle([j,m,l]);y[u]={o:k[j],x:k[m],y:k[l]};x.setStyle(j,t);x.setStyle(m,t);x.setStyle(l,t)}return x},unclip:function(){var x=this,y=(x.$cache||x.getCache()).data,k;if(y[e]){y[e]=false;k=y[u];if(k.o){x.setStyle(j,k.o)}if(k.x){x.setStyle(m,k.x)}if(k.y){x.setStyle(l,k.y)}}return x},boxWrap:function(k){k=k||Ext.baseCSSPrefix+"box";var x=Ext.get(this.insertHtml("beforeBegin","<div class='"+k+"'>"+Ext.String.format(r.boxMarkup,k)+"</div>"));Ext.DomQuery.selectNode("."+k+"-mc",x.dom).appendChild(this.dom);return x},getComputedHeight:function(){var x=this,k=Math.max(x.dom.offsetHeight,x.dom.clientHeight);if(!k){k=parseFloat(x.getStyle(q))||0;if(!x.isBorderBox()){k+=x.getFrameWidth("tb")}}return k},getComputedWidth:function(){var x=this,k=Math.max(x.dom.offsetWidth,x.dom.clientWidth);if(!k){k=parseFloat(x.getStyle(h))||0;if(!x.isBorderBox()){k+=x.getFrameWidth("lr")}}return k},getFrameWidth:function(x,k){return(k&&this.isBorderBox())?0:(this.getPadding(x)+this.getBorderWidth(x))},addClsOnOver:function(y,B,x){var z=this,A=z.dom,k=Ext.isFunction(B);z.hover(function(){if(k&&B.call(x||z,z)===false){return}Ext.fly(A,a).addCls(y)},function(){Ext.fly(A,a).removeCls(y)});return z},addClsOnFocus:function(y,B,x){var z=this,A=z.dom,k=Ext.isFunction(B);z.on("focus",function(){if(k&&B.call(x||z,z)===false){return false}Ext.fly(A,a).addCls(y)});z.on("blur",function(){Ext.fly(A,a).removeCls(y)});return z},addClsOnClick:function(y,B,x){var z=this,A=z.dom,k=Ext.isFunction(B);z.on("mousedown",function(){if(k&&B.call(x||z,z)===false){return false}Ext.fly(A,a).addCls(y);var D=Ext.getDoc(),C=function(){Ext.fly(A,a).removeCls(y);D.removeListener("mouseup",C)};D.on("mouseup",C)});return z},getStyleSize:function(){var A=this,B=this.dom,x=b.test(B.nodeName),z,k,y;if(x){return{width:r.getViewWidth(),height:r.getViewHeight()}}z=A.getStyle([q,h],true);if(z.width&&z.width!="auto"){k=parseFloat(z.width);if(A.isBorderBox()){k-=A.getFrameWidth("lr")}}if(z.height&&z.height!="auto"){y=parseFloat(z.height);if(A.isBorderBox()){y-=A.getFrameWidth("tb")}}return{width:k||A.getWidth(true),height:y||A.getHeight(true)}},statics:{selectableCls:Ext.baseCSSPrefix+"selectable",unselectableCls:Ext.baseCSSPrefix+"unselectable"},selectable:function(){var k=this;k.dom.unselectable="";k.removeCls(r.unselectableCls);k.addCls(r.selectableCls);return k},unselectable:function(){var k=this;if(Ext.isOpera){k.dom.unselectable="on"}k.removeCls(r.selectableCls);k.addCls(r.unselectableCls);return k},setVertical:function(A,x){var z=this,y=r.prototype,k;z.vertical=true;if(x){z.addCls(z.verticalCls=x)}z.setWidth=y.setHeight;z.setHeight=y.setWidth;if(!Ext.isIE9m){z.getWidth=y.getHeight;z.getHeight=y.getWidth}z.styleHooks=(A===270)?r.prototype.verticalStyleHooks270:r.prototype.verticalStyleHooks90},setHorizontal:function(){var x=this,k=x.verticalCls;delete x.vertical;if(k){delete x.verticalCls;x.removeCls(k)}delete x.setWidth;delete x.setHeight;if(!Ext.isIE9m){delete x.getWidth;delete x.getHeight}delete x.styleHooks}});r.prototype.styleHooks=v=Ext.dom.AbstractElement.prototype.styleHooks;r.prototype.verticalStyleHooks90=g=Ext.Object.chain(r.prototype.styleHooks);r.prototype.verticalStyleHooks270=o=Ext.Object.chain(r.prototype.styleHooks);g.width={name:"height"};g.height={name:"width"};g["margin-top"]={name:"marginLeft"};g["margin-right"]={name:"marginTop"};g["margin-bottom"]={name:"marginRight"};g["margin-left"]={name:"marginBottom"};g["padding-top"]={name:"paddingLeft"};g["padding-right"]={name:"paddingTop"};g["padding-bottom"]={name:"paddingRight"};g["padding-left"]={name:"paddingBottom"};g["border-top"]={name:"borderLeft"};g["border-right"]={name:"borderTop"};g["border-bottom"]={name:"borderRight"};g["border-left"]={name:"borderBottom"};o.width={name:"height"};o.height={name:"width"};o["margin-top"]={name:"marginRight"};o["margin-right"]={name:"marginBottom"};o["margin-bottom"]={name:"marginLeft"};o["margin-left"]={name:"marginTop"};o["padding-top"]={name:"paddingRight"};o["padding-right"]={name:"paddingBottom"};o["padding-bottom"]={name:"paddingLeft"};o["padding-left"]={name:"paddingTop"};o["border-top"]={name:"borderRight"};o["border-right"]={name:"borderBottom"};o["border-bottom"]={name:"borderLeft"};o["border-left"]={name:"borderTop"};if(Ext.isIE7m){v.fontSize=v["font-size"]={name:"fontSize",canThrow:true};v.fontStyle=v["font-style"]={name:"fontStyle",canThrow:true};v.fontFamily=v["font-family"]={name:"fontFamily",canThrow:true}}if(Ext.isIEQuirks||Ext.isIE&&Ext.ieVersion<=8){function c(z,x,y,k){if(k[this.styleName]=="none"){return"0px"}return k[this.name]}d=["Top","Right","Bottom","Left"];s=d.length;while(s--){i=d[s];w="border"+i+"Width";v["border-"+i.toLowerCase()+"-width"]=v[w]={name:w,styleName:"border"+i+"Style",get:c}}}Ext.getDoc().on("selectstart",function(A,C){var B=document.documentElement,z=r.selectableCls,y=r.unselectableCls,k=C&&C.tagName;k=k&&k.toLowerCase();if(k==="input"||k==="textarea"){return}while(C&&C.nodeType===1&&C!==B){var x=Ext.fly(C);if(x.hasCls(z)){return}if(x.hasCls(y)){A.stopEvent();return}C=C.parentNode}})});Ext.onReady(function(){var c=/alpha\(opacity=(.*)\)/i,b=/^\s+|\s+$/g,a=Ext.dom.Element.prototype.styleHooks;a.opacity={name:"opacity",afterSet:function(g,e,d){if(d.isLayer){d.onOpacitySet(e)}}};if(!Ext.supports.Opacity&&Ext.isIE){Ext.apply(a.opacity,{get:function(h){var g=h.style.filter,e,d;if(g.match){e=g.match(c);if(e){d=parseFloat(e[1]);if(!isNaN(d)){return d?d/100:0}}}return 1},set:function(h,e){var d=h.style,g=d.filter.replace(c,"").replace(b,"");d.zoom=1;if(typeof(e)=="number"&&e>=0&&e<1){e*=100;d.filter=g+(g.length?" ":"")+"alpha(opacity="+e+")"}else{d.filter=g}}})}});Ext.define("Ext.util.Positionable",{_positionTopLeft:["position","top","left"],_alignRe:/^([a-z]+)-([a-z]+)(\?)?$/,afterSetPosition:Ext.emptyFn,adjustForConstraints:function(c,b){var a=this.getConstrainVector(b,c);if(a){c[0]+=a[0];c[1]+=a[1]}return c},alignTo:function(c,a,g,b){var e=this,d=e.el;return e.setXY(e.getAlignToXY(c,a,g),d.anim&&!!b?d.anim(b):false)},anchorTo:function(h,e,b,a,j,k){var g=this,i=!Ext.isEmpty(j),c=function(){g.alignTo(h,e,b,a);Ext.callback(k,g)},d=g.getAnchor();g.removeAnchor();Ext.apply(d,{fn:c,scroll:i});Ext.EventManager.onWindowResize(c,null);if(i){Ext.EventManager.on(window,"scroll",c,null,{buffer:!isNaN(j)?j:50})}c();return g},calculateAnchorXY:function(g,i,h,d){var j=this,c=j.el,k=document,e=c.dom==k.body||c.dom==k,l=Math.round,m,b,a;g=(g||"tl").toLowerCase();d=d||{};b=d.width||e?Ext.Element.getViewWidth():j.getWidth();a=d.height||e?Ext.Element.getViewHeight():j.getHeight();switch(g){case"tl":m=[0,0];break;case"bl":m=[0,a];break;case"tr":m=[b,0];break;case"c":m=[l(b*0.5),l(a*0.5)];break;case"t":m=[l(b*0.5),0];break;case"l":m=[0,l(a*0.5)];break;case"r":m=[b,l(a*0.5)];break;case"b":m=[l(b*0.5),a];break;case"tc":m=[l(b*0.5),0];break;case"bc":m=[l(b*0.5),a];break;case"br":m=[b,a]}return[m[0]+i,m[1]+h]},convertPositionSpec:function(a){return a},getAlignToXY:function(j,C,e){var D=this,A=Ext.Element.getViewWidth()-10,d=Ext.Element.getViewHeight()-10,E=document,B=E.documentElement,o=E.body,z=(B.scrollLeft||o.scrollLeft||0),v=(B.scrollTop||o.scrollTop||0),a,h,s,g,t,u,q,r,w,p,n,b,c,i,l,m,k;j=Ext.get(j.el||j);if(!j||!j.dom){}e=e||[0,0];C=(!C||C=="?"?"tl-bl?":(!(/-/).test(C)&&C!==""?"tl-"+C:C||"tl-bl")).toLowerCase();C=D.convertPositionSpec(C);a=C.match(D._alignRe);p=a[1];n=a[2];w=!!a[3];h=D.getAnchorXY(p,true);s=D.getAnchorToXY(j,n,false);m=s[0]-h[0]+e[0];k=s[1]-h[1]+e[1];if(w){g=D.getWidth();t=D.getHeight();u=j.getRegion();b=p.charAt(0);c=p.charAt(p.length-1);i=n.charAt(0);l=n.charAt(n.length-1);q=((b=="t"&&i=="b")||(b=="b"&&i=="t"));r=((c=="r"&&l=="l")||(c=="l"&&l=="r"));if(m+g>A+z){m=r?u.left-g:A+z-g}if(m<z){m=r?u.right:z}if(k+t>d+v){k=q?u.top-t:d+v-t}if(k<v){k=q?u.bottom:v}}return[m,k]},getAnchor:function(){var b=this.el,c=(b.$cache||b.getCache()).data,a;if(!b.dom){return}a=c._anchor;if(!a){a=c._anchor={}}return a},getAnchorXY:function(d,i,b){var h=this,j=h.getXY(),a=h.el,l=document,c=a.dom==l.body||a.dom==l,k=a.getScroll(),g=c?k.left:i?0:j[0],e=c?k.top:i?0:j[1];return h.calculateAnchorXY(d,g,e,b)},getBox:function(d,i){var e=this,m=i?e.getLocalXY():e.getXY(),j=m[0],g=m[1],k=e.getWidth(),b=e.getHeight(),c,a,l;if(d){c=e.getBorderPadding();a=c.beforeX;l=c.beforeY;j+=a;g+=l;k-=(a+c.afterX);b-=(l+c.afterY)}return{x:j,left:j,0:j,y:g,top:g,1:g,width:k,height:b,right:j+k,bottom:g+b}},calculateConstrainedPosition:function(h,b,l,d){var k=this,c,i=k.floatParent,e=i?i.getTargetEl():null,a,g,j,m=false;if(l&&i){a=e.getXY();g=e.getBorderPadding();a[0]+=g.beforeX;a[1]+=g.beforeY;if(b){j=[b[0]+a[0],b[1]+a[1]]}}else{j=b}h=h||k.constrainTo||e||k.container||k.el.parent();c=(k.constrainHeader?k.header.el:k.el).getConstrainVector(h,j,d);if(c){m=b||k.getPosition(l);m[0]+=c[0];m[1]+=c[1]}return m},getConstrainVector:function(e,c,a){var h=this.getRegion(),b=[0,0],g=(this.shadow&&this.constrainShadow&&!this.shadowDisabled)?this.shadow.getShadowSize():undefined,d=false;if(!(e instanceof Ext.util.Region)){e=Ext.get(e.el||e).getViewRegion()}if(c){h.translateBy(c[0]-h.x,c[1]-h.y)}if(a){h.right=h.left+a[0];h.bottom=h.top+a[1]}if(g){e.adjust(g[0],-g[1],-g[2],g[3])}if(h.right>e.right){d=true;b[0]=(e.right-h.right)}if(h.left+b[0]<e.left){d=true;b[0]=(e.left-h.left)}if(h.bottom>e.bottom){d=true;b[1]=(e.bottom-h.bottom)}if(h.top+b[1]<e.top){d=true;b[1]=(e.top-h.top)}return d?b:false},getOffsetsTo:function(a){var c=this.getXY(),b=Ext.fly(a.el||a,"_internal").getXY();return[c[0]-b[0],c[1]-b[1]]},getRegion:function(){var a=this.getBox();return new Ext.util.Region(a.top,a.right,a.bottom,a.left)},getViewRegion:function(){var g=this,c=g.el,a=c.dom.nodeName==="BODY",e,j,h,i,d,b,k;if(a){j=c.getScroll();d=j.left;i=j.top;b=Ext.dom.AbstractElement.getViewportWidth();k=Ext.dom.AbstractElement.getViewportHeight()}else{e=g.getBorderPadding();h=g.getXY();d=h[0]+e.beforeX;i=h[1]+e.beforeY;b=g.getWidth(true);k=g.getHeight(true)}return new Ext.util.Region(i,d+b,i+k,d)},move:function(j,b,c){var g=this,m=g.getXY(),k=m[0],i=m[1],d=[k-b,i],l=[k+b,i],h=[k,i-b],a=[k,i+b],e={l:d,left:d,r:l,right:l,t:h,top:h,up:h,b:a,bottom:a,down:a};j=j.toLowerCase();g.setXY([e[j][0],e[j][1]],c)},removeAnchor:function(){var a=this.getAnchor();if(a&&a.fn){Ext.EventManager.removeResizeListener(a.fn);if(a.scroll){Ext.EventManager.un(window,"scroll",a.fn)}delete a.fn}return this},setBox:function(d,a){var e=this,b=e.el,i=d.x,g=d.y,l=[i,g],j=d.width,c=d.height,k=e.constrain&&e.calculateConstrainedPosition(null,[i,g],false,[j,c]);if(k){i=k[0];g=k[1]}if(!a||!b.anim){e.setSize(j,c);e.setXY([i,g]);e.afterSetPosition(i,g)}else{e.animate(Ext.applyIf({to:{x:i,y:g,width:b.adjustWidth(j),height:b.adjustHeight(c)},listeners:{afteranimate:Ext.Function.bind(e.afterSetPosition,e,[i,g])}},a))}return e},setRegion:function(b,a){return this.setBox({x:b.left,y:b.top,width:b.right-b.left,height:b.bottom-b.top},a)},translatePoints:function(a,c){var b=this.translateXY(a,c);return{left:b.x,top:b.y}},translateXY:function(h,e){var d=this,b=d.el,i=b.getStyle(d._positionTopLeft),a=i.position=="relative",c=parseFloat(i.left),g=parseFloat(i.top),j=d.getXY();if(Ext.isArray(h)){e=h[1];h=h[0]}if(isNaN(c)){c=a?0:b.dom.offsetLeft}if(isNaN(g)){g=a?0:b.dom.offsetTop}c=(typeof h=="number")?h-j[0]+c:undefined;g=(typeof e=="number")?e-j[1]+g:undefined;return{x:c,y:g}}});Ext.define("Ext.dom.Element",function(a){var b="hidden",g=document,j="visibility",c="display",k="none",e=Ext.baseCSSPrefix+"masked",l=Ext.baseCSSPrefix+"masked-relative",i=Ext.baseCSSPrefix+"mask-msg",m=/^body/i,h,d=Ext.isStrict?{select:1}:{input:1,select:1,textarea:1},n=function(t){var s=[],o=-1,q,p;for(q=0;p=t[q];q++){if(p.scrollTop>0||p.scrollLeft>0){s[++o]=p}}return s};return{extend:Ext.dom.AbstractElement,alternateClassName:["Ext.Element","Ext.core.Element"],tableTagRe:/^(?:tr|td|table|tbody)$/i,mixins:[Ext.util.Positionable],addUnits:function(){return a.addUnits.apply(a,arguments)},focus:function(r,q){var o=this;q=q||o.dom;try{if(Number(r)){Ext.defer(o.focus,r,o,[null,q])}else{q.focus()}}catch(p){}return o},blur:function(){var o=this,q=o.dom;if(q!==document.body){try{q.blur()}catch(p){}return o}else{return o.focus(undefined,q)}},isBorderBox:function(){var o=Ext.isBorderBox;if(o&&Ext.isIE7m){o=!((this.dom.tagName||"").toLowerCase() in d)}return o},hover:function(p,o,r,q){var s=this;s.on("mouseenter",p,r||s.dom,q);s.on("mouseleave",o,r||s.dom,q);return s},getAttributeNS:function(p,o){return this.getAttribute(o,p)},getAttribute:(Ext.isIE&&!(Ext.isIE9p&&g.documentMode>=9))?function(o,q){var r=this.dom,p;if(q){p=typeof r[q+":"+o];if(p!="undefined"&&p!="unknown"){return r[q+":"+o]||null}return null}if(o==="for"){o="htmlFor"}return r[o]||null}:function(o,p){var q=this.dom;if(p){return q.getAttributeNS(p,o)||q.getAttribute(p+":"+o)}return q.getAttribute(o)||q[o]||null},cacheScrollValues:function(){var s=this,r,q,p,t=[],o=function(){for(p=0;p<r.length;p++){q=r[p];q.scrollLeft=t[p][0];q.scrollTop=t[p][1]}};if(!Ext.DomQuery.pseudos.isScrolled){Ext.DomQuery.pseudos.isScrolled=n}r=s.query(":isScrolled");for(p=0;p<r.length;p++){q=r[p];t[p]=[q.scrollLeft,q.scrollTop]}return o},autoBoxAdjust:true,isVisible:function(o){var q=this,r=q.dom,p=r.ownerDocument.documentElement;if(!h){h=new a.Fly()}while(r!==p){if(!r||r.nodeType===11||(h.attach(r)).isStyle(j,b)||h.isStyle(c,k)){return false}if(!o){break}r=r.parentNode}return true},isDisplayed:function(){return !this.isStyle(c,k)},enableDisplayMode:function(p){var o=this;o.setVisibilityMode(a.DISPLAY);if(!Ext.isEmpty(p)){(o.$cache||o.getCache()).data.originalDisplay=p}return o},mask:function(o,y,v){var A=this,r=A.dom,s=r.style.setExpression,u=(A.$cache||A.getCache()).data,q=u.maskShimEl,x=u.maskEl,p=u.maskMsg,t,w;if(!(m.test(r.tagName)&&A.getStyle("position")=="static")){A.addCls(l)}if(x){x.remove()}if(p){p.remove()}if(q){q.remove()}if(Ext.isIE6){q=Ext.DomHelper.append(r,{tag:"iframe",cls:Ext.baseCSSPrefix+"shim "+Ext.baseCSSPrefix+"mask-shim"},true);u.maskShimEl=q;q.setDisplayed(true)}Ext.DomHelper.append(r,[{cls:Ext.baseCSSPrefix+"mask",style:"top:0;left:0;"},{cls:y?i+" "+y:i,cn:{tag:"div",cls:Ext.baseCSSPrefix+"mask-msg-inner",cn:{tag:"div",cls:Ext.baseCSSPrefix+"mask-msg-text",html:o||""}}}]);p=Ext.get(r.lastChild);x=Ext.get(p.dom.previousSibling);u.maskMsg=p;u.maskEl=x;A.addCls(e);x.setDisplayed(true);if(typeof o=="string"){p.setDisplayed(true);p.center(A)}else{p.setDisplayed(false)}if(!Ext.supports.IncludePaddingInWidthCalculation&&s){try{x.dom.style.setExpression("width",'this.parentNode.clientWidth + "px"');t='this.parentNode.clientWidth + "px"';if(q){q.dom.style.setExpression("width",t)}x.dom.style.setExpression("width",t)}catch(z){}}if(!Ext.supports.IncludePaddingInHeightCalculation&&s){try{w="this.parentNode."+(r==g.body?"scrollHeight":"offsetHeight")+' + "px"';if(q){q.dom.style.setExpression("height",w)}x.dom.style.setExpression("height",w)}catch(z){}}else{if(Ext.isIE9m&&!(Ext.isIE7&&Ext.isStrict)&&A.getStyle("height")=="auto"){if(q){q.setSize(undefined,v||A.getHeight())}x.setSize(undefined,v||A.getHeight())}}return x},unmask:function(){var s=this,t=(s.$cache||s.getCache()).data,r=t.maskEl,p=t.maskShimEl,o=t.maskMsg,q;if(r){q=r.dom.style;if(q.clearExpression){q.clearExpression("width");q.clearExpression("height")}if(r){r.remove();delete t.maskEl}if(o){o.remove();delete t.maskMsg}s.removeCls([e,l]);if(p){q=p.dom.style;if(q.clearExpression){q.clearExpression("width");q.clearExpression("height")}p.remove();delete t.maskShimEl}}},isMasked:function(){var q=this,s=(q.$cache||q.getCache()).data,p=s.maskEl,o=s.maskMsg,r=false;if(p&&p.isVisible()){if(o){o.center(q)}r=true}return r},createShim:function(){var o=g.createElement("iframe"),p;o.frameBorder="0";o.className=Ext.baseCSSPrefix+"shim";o.src=Ext.SSL_SECURE_URL;p=Ext.get(this.dom.parentNode.insertBefore(o,this.dom));p.autoBoxAdjust=false;return p},addKeyListener:function(p,r,q){var o;if(typeof p!="object"||Ext.isArray(p)){o={target:this,key:p,fn:r,scope:q}}else{o={target:this,key:p.key,shift:p.shift,ctrl:p.ctrl,alt:p.alt,fn:r,scope:q}}return new Ext.util.KeyMap(o)},addKeyMap:function(o){return new Ext.util.KeyMap(Ext.apply({target:this},o))},on:function(o,r,q,p){Ext.EventManager.on(this,o,r,q||this,p);return this},un:function(o,q,p){Ext.EventManager.un(this,o,q,p||this);return this},removeAllListeners:function(){Ext.EventManager.removeAll(this);return this},purgeAllListeners:function(){Ext.EventManager.purgeElement(this);return this},select:function(o){return a.select(o,false,this.dom)}}},function(){var DOC=document,EC=Ext.cache,Element=this,AbstractElement=Ext.dom.AbstractElement,focusRe=/^a|button|embed|iframe|input|object|select|textarea$/i,nonSpaceRe=/\S/,scriptTagRe=/(?:<script([^>]*)?>)((\n|\r|.)*?)(?:<\/script>)/ig,replaceScriptTagRe=/(?:<script.*?>)((\n|\r|.)*?)(?:<\/script>)/ig,srcRe=/\ssrc=([\'\"])(.*?)\1/i,typeRe=/\stype=([\'\"])(.*?)\1/i,useDocForId=!Ext.isIE8m,internalFly;Element.boxMarkup='<div class="{0}-tl"><div class="{0}-tr"><div class="{0}-tc"></div></div></div><div class="{0}-ml"><div class="{0}-mr"><div class="{0}-mc"></div></div></div><div class="{0}-bl"><div class="{0}-br"><div class="{0}-bc"></div></div></div>';function garbageCollect(){if(!Ext.enableGarbageCollector){clearInterval(Element.collectorThreadId)}else{var eid,d,o,t;for(eid in EC){if(!EC.hasOwnProperty(eid)){continue}o=EC[eid];if(o.skipGarbageCollection){continue}d=o.dom;if(!d.parentNode||(!d.offsetParent&&!Ext.getElementById(eid))){if(d&&Ext.enableListenerCollection){Ext.EventManager.removeAll(d)}delete EC[eid]}}if(Ext.isIE){t={};for(eid in EC){if(!EC.hasOwnProperty(eid)){continue}t[eid]=EC[eid]}EC=Ext.cache=t}}}Element.collectorThreadId=setInterval(garbageCollect,30000);Element.addMethods({monitorMouseLeave:function(delay,handler,scope){var me=this,timer,listeners={mouseleave:function(e){timer=setTimeout(Ext.Function.bind(handler,scope||me,[e]),delay)},mouseenter:function(){clearTimeout(timer)},freezeEvent:true};me.on(listeners);return listeners},swallowEvent:function(eventName,preventDefault){var me=this,e,eLen,fn=function(e){e.stopPropagation();if(preventDefault){e.preventDefault()}};if(Ext.isArray(eventName)){eLen=eventName.length;for(e=0;e<eLen;e++){me.on(eventName[e],fn)}return me}me.on(eventName,fn);return me},relayEvent:function(eventName,observable){this.on(eventName,function(e){observable.fireEvent(eventName,e)})},clean:function(forceReclean){var me=this,dom=me.dom,data=(me.$cache||me.getCache()).data,n=dom.firstChild,ni=-1,nx;if(data.isCleaned&&forceReclean!==true){return me}while(n){nx=n.nextSibling;if(n.nodeType==3){if(!(nonSpaceRe.test(n.nodeValue))){dom.removeChild(n)}else{if(nx&&nx.nodeType==3){n.appendData(Ext.String.trim(nx.data));dom.removeChild(nx);nx=n.nextSibling;n.nodeIndex=++ni}}}else{internalFly.attach(n).clean();n.nodeIndex=++ni}n=nx}data.isCleaned=true;return me},load:function(options){this.getLoader().load(options);return this},getLoader:function(){var me=this,data=(me.$cache||me.getCache()).data,loader=data.loader;if(!loader){data.loader=loader=new Ext.ElementLoader({target:me})}return loader},syncContent:function(source){source=Ext.getDom(source);var sourceNodes=source.childNodes,sourceLen=sourceNodes.length,dest=this.dom,destNodes=dest.childNodes,destLen=destNodes.length,i,destNode,sourceNode,nodeType,newAttrs,attLen,attName;if(dest.mergeAttributes){dest.mergeAttributes(source,true);dest.src=source.src}else{newAttrs=source.attributes;attLen=newAttrs.length;for(i=0;i<attLen;i++){attName=newAttrs[i].name;if(attName!=="id"){dest.setAttribute(attName,newAttrs[i].value)}}}if(sourceLen!==destLen){dest.innerHTML=source.innerHTML;return}for(i=0;i<sourceLen;i++){sourceNode=sourceNodes[i];destNode=destNodes[i];nodeType=sourceNode.nodeType;if(nodeType!==destNode.nodeType||(nodeType===1&&sourceNode.tagName!==destNode.tagName)){dest.innerHTML=source.innerHTML;return}if(nodeType===3){destNode.data=sourceNode.data}else{if(sourceNode.id&&destNode.id!==sourceNode.id){destNode.id=sourceNode.id}destNode.style.cssText=sourceNode.style.cssText;destNode.className=sourceNode.className;internalFly.attach(destNode).syncContent(sourceNode)}}},update:function(html,loadScripts,callback){var me=this,id,dom,interval;if(!me.dom){return me}html=html||"";dom=me.dom;if(loadScripts!==true){dom.innerHTML=html;Ext.callback(callback,me);return me}id=Ext.id();html+='<span id="'+id+'"></span>';interval=setInterval(function(){var hd,match,attrs,srcMatch,typeMatch,el,s;if(!(el=DOC.getElementById(id))){return false}clearInterval(interval);Ext.removeNode(el);hd=Ext.getHead().dom;while((match=scriptTagRe.exec(html))){attrs=match[1];srcMatch=attrs?attrs.match(srcRe):false;if(srcMatch&&srcMatch[2]){s=DOC.createElement("script");s.src=srcMatch[2];typeMatch=attrs.match(typeRe);if(typeMatch&&typeMatch[2]){s.type=typeMatch[2]}hd.appendChild(s)}else{if(match[2]&&match[2].length>0){if(window.execScript){window.execScript(match[2])}else{window.eval(match[2])}}}}Ext.callback(callback,me)},20);dom.innerHTML=html.replace(replaceScriptTagRe,"");return me},removeAllListeners:function(){this.removeAnchor();Ext.EventManager.removeAll(this.dom);return this},createProxy:function(config,renderTo,matchBox){config=(typeof config=="object")?config:{tag:"div",cls:config};var me=this,proxy=renderTo?Ext.DomHelper.append(renderTo,config,true):Ext.DomHelper.insertBefore(me.dom,config,true);proxy.setVisibilityMode(Element.DISPLAY);proxy.hide();if(matchBox&&me.setBox&&me.getBox){proxy.setBox(me.getBox())}return proxy},needsTabIndex:function(){if(this.dom){if((this.dom.nodeName==="a")&&(!this.dom.href)){return true}return !focusRe.test(this.dom.nodeName)}},isFocusable:function(asFocusEl){var dom=this.dom,tabIndexAttr=dom.getAttributeNode("tabIndex"),tabIndex,nodeName=dom.nodeName,canFocus=false;if(tabIndexAttr&&tabIndexAttr.specified){tabIndex=tabIndexAttr.value}if(dom&&!dom.disabled){if(tabIndex==-1){canFocus=Ext.FocusManager&&Ext.FocusManager.enabled&&asFocusEl}else{if(focusRe.test(nodeName)){if((nodeName!=="a")||dom.href){canFocus=true}}else{canFocus=tabIndex!=null&&tabIndex>=0}}canFocus=canFocus&&this.isVisible(true)}return canFocus}});if(Ext.isIE){Element.prototype.getById=function(id,asDom){var dom=this.dom,cacheItem,el,ret;if(dom){el=(useDocForId&&DOC.getElementById(id))||dom.all[id];if(el){if(asDom){ret=el}else{cacheItem=EC[id];if(cacheItem&&cacheItem.el){ret=Ext.updateCacheEntry(cacheItem,el).el}else{ret=new Element(el)}}return ret}}return asDom?Ext.getDom(id):Element.get(id)}}Element.createAlias({addListener:"on",removeListener:"un",clearListeners:"removeAllListeners",focusable:"isFocusable"});Element.Fly=AbstractElement.Fly=new Ext.Class({extend:Element,isFly:true,constructor:function(dom){this.dom=dom;this.el=this},attach:AbstractElement.Fly.prototype.attach});internalFly=new Element.Fly();if(Ext.isIE){Ext.getElementById=function(id){var el=DOC.getElementById(id),detachedBodyEl;if(!el&&(detachedBodyEl=AbstractElement.detachedBodyEl)){el=detachedBodyEl.dom.all[id]}return el}}else{if(!DOC.querySelector){Ext.getDetachedBody=Ext.getBody;Ext.getElementById=function(id){return DOC.getElementById(id)}}}});Ext.define("Ext.dom.CompositeElementLite",{alternateClassName:"Ext.CompositeElementLite",statics:{importElementMethods:function(){var b,c=Ext.dom.Element.prototype,a=this.prototype;for(b in c){if(typeof c[b]=="function"){(function(d){a[d]=a[d]||function(){return this.invoke(d,arguments)}}).call(a,b)}}}},constructor:function(b,a){this.elements=[];this.add(b,a);this.el=new Ext.dom.AbstractElement.Fly()},isComposite:true,getElement:function(a){return this.el.attach(a)},transformElement:function(a){return Ext.getDom(a)},getCount:function(){return this.elements.length},add:function(c,a){var e=this.elements,b,d;if(!c){return this}if(typeof c=="string"){c=Ext.dom.Element.selectorFunction(c,a)}else{if(c.isComposite){c=c.elements}else{if(!Ext.isIterable(c)){c=[c]}}}for(b=0,d=c.length;b<d;++b){e.push(this.transformElement(c[b]))}return this},invoke:function(d,a){var g=this.elements,e=g.length,c,b;d=Ext.dom.Element.prototype[d];for(b=0;b<e;b++){c=g[b];if(c){d.apply(this.getElement(c),a)}}return this},item:function(b){var c=this.elements[b],a=null;if(c){a=this.getElement(c)}return a},slice:function(){return this.elements.slice.apply(this.elements,arguments)},addListener:function(b,j,h,g){var d=this.elements,a=d.length,c,k;for(c=0;c<a;c++){k=d[c];if(k){Ext.EventManager.on(k,b,j,h||k,g)}}return this},each:function(g,d){var h=this,c=h.elements,a=c.length,b,j;for(b=0;b<a;b++){j=c[b];if(j){j=this.getElement(j);if(g.call(d||j,j,h,b)===false){break}}}return h},fill:function(a){var b=this;b.elements=[];b.add(a);return b},insert:function(b,a){Ext.Array.insert(this.elements,b,a)},filter:function(b){var h=this,c=h.elements,g=c.length,d=[],e=0,j=typeof b=="function",k,a;for(;e<g;e++){a=c[e];k=false;if(a){a=h.getElement(a);if(j){k=b.call(a,a,h,e)!==false}else{k=a.is(b)}if(k){d.push(h.transformElement(a))}}}h.elements=d;return h},indexOf:function(a){return Ext.Array.indexOf(this.elements,this.transformElement(a))},replaceElement:function(e,c,a){var b=!isNaN(e)?e:this.indexOf(e),g;if(b>-1){c=Ext.getDom(c);if(a){g=this.elements[b];g.parentNode.insertBefore(c,g);Ext.removeNode(g)}Ext.Array.splice(this.elements,b,1,c)}return this},clear:function(d){var c=this,b=c.elements,a=b.length-1;if(d){for(;a>=0;a--){Ext.removeNode(b[a])}}this.elements=[]},addElements:function(d,b){if(!d){return this}if(typeof d=="string"){d=Ext.dom.Element.selectorFunction(d,b)}var c=this.elements,a=d.length,g;for(g=0;g<a;g++){c.push(Ext.get(d[g]))}return this},first:function(){return this.item(0)},last:function(){return this.item(this.getCount()-1)},contains:function(a){return this.indexOf(a)!=-1},removeElement:function(e,i){e=[].concat(e);var d=this,g=d.elements,c=e.length,h,b,a;for(a=0;a<c;a++){h=e[a];if((b=(g[h]||g[h=d.indexOf(h)]))){if(i){if(b.dom){b.remove()}else{Ext.removeNode(b)}}Ext.Array.erase(g,h,1)}}return d}},function(){this.importElementMethods();this.prototype.on=this.prototype.addListener;if(Ext.DomQuery){Ext.dom.Element.selectorFunction=Ext.DomQuery.select}Ext.dom.Element.select=function(a,b){var c;if(typeof a=="string"){c=Ext.dom.Element.selectorFunction(a,b)}else{if(a.length!==undefined){c=a}else{}}return new Ext.CompositeElementLite(c)};Ext.select=function(){return Ext.dom.Element.select.apply(Ext.dom.Element,arguments)}});Ext.define("Ext.dom.CompositeElement",{alternateClassName:"Ext.CompositeElement",extend:Ext.dom.CompositeElementLite,getElement:function(a){return a},transformElement:function(a){return Ext.get(a)}},function(){Ext.dom.Element.select=function(a,d,b){var c;if(typeof a=="string"){c=Ext.dom.Element.selectorFunction(a,b)}else{if(a.length!==undefined){c=a}else{}}return(d===true)?new Ext.CompositeElement(c):new Ext.CompositeElementLite(c)}});Ext.select=Ext.Element.select;Ext.define("Ext.util.HashMap",{mixins:{observable:Ext.util.Observable},constructor:function(a){a=a||{};var c=this,b=a.keyFn;c.initialConfig=a;c.addEvents("add","clear","remove","replace");c.mixins.observable.constructor.call(c,a);c.clear(true);if(b){c.getKey=b}},getCount:function(){return this.length},getData:function(a,b){if(b===undefined){b=a;a=this.getKey(b)}return[a,b]},getKey:function(a){return a.id},add:function(a,c){var b=this;if(arguments.length===1){c=a;a=b.getKey(c)}if(b.containsKey(a)){return b.replace(a,c)}b.map[a]=c;++b.length;if(b.hasListeners.add){b.fireEvent("add",b,a,c)}return c},replace:function(b,d){var c=this,e=c.map,a;if(arguments.length===1){d=b;b=c.getKey(d)}if(!c.containsKey(b)){c.add(b,d)}a=e[b];e[b]=d;if(c.hasListeners.replace){c.fireEvent("replace",c,b,d,a)}return d},remove:function(b){var a=this.findKey(b);if(a!==undefined){return this.removeAtKey(a)}return false},removeAtKey:function(a){var b=this,c;if(b.containsKey(a)){c=b.map[a];delete b.map[a];--b.length;if(b.hasListeners.remove){b.fireEvent("remove",b,a,c)}return true}return false},get:function(a){return this.map[a]},clear:function(a){var b=this;b.map={};b.length=0;if(a!==true&&b.hasListeners.clear){b.fireEvent("clear",b)}return b},containsKey:function(a){return this.map[a]!==undefined},contains:function(a){return this.containsKey(this.findKey(a))},getKeys:function(){return this.getArray(true)},getValues:function(){return this.getArray(false)},getArray:function(d){var a=[],b,c=this.map;for(b in c){if(c.hasOwnProperty(b)){a.push(d?b:c[b])}}return a},each:function(d,c){var a=Ext.apply({},this.map),b,e=this.length;c=c||this;for(b in a){if(a.hasOwnProperty(b)){if(d.call(c,b,a[b],e)===false){break}}}return this},clone:function(){var c=new this.self(this.initialConfig),b=this.map,a;c.suspendEvents();for(a in b){if(b.hasOwnProperty(a)){c.add(a,b[a])}}c.resumeEvents();return c},findKey:function(b){var a,c=this.map;for(a in c){if(c.hasOwnProperty(a)&&c[a]===b){return a}}return undefined}});Ext.define("Ext.AbstractManager",{typeName:"type",constructor:function(a){Ext.apply(this,a||{});this.all=new Ext.util.HashMap();this.types={}},get:function(a){return this.all.get(a)},register:function(a){this.all.add(a)},unregister:function(a){this.all.remove(a)},registerType:function(b,a){this.types[b]=a;a[this.typeName]=b},isRegistered:function(a){return this.types[a]!==undefined},create:function(a,d){var b=a[this.typeName]||a.type||d,c=this.types[b];return new c(a)},onAvailable:function(g,c,b){var a=this.all,d,e;if(a.containsKey(g)){d=a.get(g);c.call(b||d,d)}else{e=function(j,h,i){if(h==g){c.call(b||i,i);a.un("add",e)}};a.on("add",e)}},each:function(b,a){this.all.each(b,a||this)},getCount:function(){return this.all.getCount()}});Ext.define("Ext.ComponentManager",{extend:Ext.AbstractManager,alternateClassName:"Ext.ComponentMgr",singleton:true,typeName:"xtype",create:function(a,b){if(typeof a=="string"){return Ext.widget(a)}if(a.isComponent){return a}return Ext.widget(a.xtype||b,a)},registerType:function(b,a){this.types[b]=a;a[this.typeName]=b;a.prototype[this.typeName]=b}},function(){Ext.getCmp=function(a){return Ext.ComponentManager.get(a)}});Ext.define("Ext.ComponentQuery",{singleton:true},function(){var i=this,l=Ext.dom.Query.operators,o=/(\d*)n\+?(\d*)/,a=/\D/,m=["var r = [],","i = 0,","it = items,","l = it.length,","c;","for (; i < l; i++) {","c = it[i];","if (c.{0}) {","r.push(c);","}","}","return r;"].join(""),g=function(s,r){return r.method.apply(this,[s].concat(r.args))},b=function(t,x){var r=[],u=0,w=t.length,v,s=x!==">";for(;u<w;u++){v=t[u];if(v.getRefItems){r=r.concat(v.getRefItems(s))}}return r},h=function(s){var r=[],t=0,v=s.length,u;for(;t<v;t++){u=s[t];while(!!(u=u.getRefOwner())){r.push(u)}}return r},p=function(s,x,w){if(x==="*"){return s.slice()}else{var r=[],t=0,v=s.length,u;for(;t<v;t++){u=s[t];if(u.isXType(x,w)){r.push(u)}}return r}},k=function(s,v){var r=[],t=0,w=s.length,u;for(;t<w;t++){u=s[t];if(u.hasCls(v)){r.push(u)}}return r},q=function(z,A,u,t){var D=[],y=0,s=z.length,C,v,B,r,x,w;if(A.charAt(0)==="@"){C=true;A=A.substr(1)}if(A.charAt(0)==="?"){C=true;v=true;A=A.substr(1)}for(;y<s;y++){B=z[y];if(!C||B.hasOwnProperty(A)){r=B[A];if(v){D.push(B)}else{if(u==="~="){if(r){if(!Ext.isArray(r)){r=r.split(" ")}for(x=0,w=r.length;x<w;x++){if(l[u](Ext.coerce(r[x],t),t)){D.push(B);break}}}}else{if(!t?!!B[A]:l[u](Ext.coerce(r,t),t)){D.push(B)}}}}}return D},e=function(s,w){var r=[],t=0,v=s.length,u;for(;t<v;t++){u=s[t];if(u.getItemId()===w){r.push(u)}}return r},n=function(r,s,t){return i.pseudos[s](r,t)},j=/^(\s?([>\^])\s?|\s|$)/,d=/^(#)?([\w\-]+|\*)(?:\((true|false)\))?/,c=[{re:/^\.([\w\-]+)(?:\((true|false)\))?/,method:p},{re:/^(?:\[((?:@|\?)?[\w\-\$]*[^\^\$\*~%!])\s?(?:(=|.=)\s?['"]?(.*?)["']?)?\])/,method:q},{re:/^#([\w\-]+)/,method:e},{re:/^\:([\w\-]+)(?:\(((?:\{[^\}]+\})|(?:(?!\{)[^\s>\/]*?(?!\})))\))?/,method:n},{re:/^(?:\{([^\}]+)\})/,method:m}];i.Query=Ext.extend(Object,{constructor:function(r){r=r||{};Ext.apply(this,r)},execute:function(s){var u=this.operations,v=0,w=u.length,t,r;if(!s){r=Ext.ComponentManager.all.getArray()}else{if(Ext.isIterable(s)){r=s}else{if(s.isMixedCollection){r=s.items}}}for(;v<w;v++){t=u[v];if(t.mode==="^"){r=h(r||[s])}else{if(t.mode){r=b(r||[s],t.mode)}else{r=g(r||b([s]),t)}}if(v===w-1){return r}}return[]},is:function(t){var s=this.operations,w=Ext.isArray(t)?t:[t],r=w.length,x=s[s.length-1],v,u;w=g(w,x);if(w.length===r){if(s.length>1){for(u=0,v=w.length;u<v;u++){if(Ext.Array.indexOf(this.execute(),w[u])===-1){return false}}}return true}return false}});Ext.apply(this,{cache:{},pseudos:{not:function(x,r){var y=Ext.ComponentQuery,v=0,w=x.length,u=[],t=-1,s;for(;v<w;++v){s=x[v];if(!y.is(s,r)){u[++t]=s}}return u},first:function(s){var r=[];if(s.length>0){r.push(s[0])}return r},last:function(t){var r=t.length,s=[];if(r>0){s.push(t[r-1])}return s},focusable:function(s){var r=s.length,u=[],t=0,v;for(;t<r;t++){v=s[t];if(v.isFocusable()){u.push(v)}}return u},"nth-child":function(x,y){var z=[],s=o.exec(y=="even"&&"2n"||y=="odd"&&"2n+1"||!a.test(y)&&"n+"+y||y),w=(s[1]||1)-0,u=s[2]-0,v,r,t;for(v=0;r=x[v];v++){t=v+1;if(w==1){if(u==0||t==u){z.push(r)}}else{if((t+u)%w==0){z.push(r)}}}return z}},query:function(s,z){var A=s.split(","),r=A.length,t=0,u=[],B=[],y={},w,v,x;for(;t<r;t++){s=Ext.String.trim(A[t]);w=this.cache[s]||(this.cache[s]=this.parse(s));u=u.concat(w.execute(z))}if(r>1){v=u.length;for(t=0;t<v;t++){x=u[t];if(!y[x.id]){B.push(x);y[x.id]=true}}u=B}return u},is:function(s,r){if(!r){return true}var u=r.split(","),v=u.length,t=0,w;for(;t<v;t++){r=Ext.String.trim(u[t]);w=this.cache[r]||(this.cache[r]=this.parse(r));if(w.is(s)){return true}}return false},parse:function(u){var s=[],t=c.length,y,v,z,A,B,w,x,r;while(u&&y!==u){y=u;v=u.match(d);if(v){z=v[1];if(z==="#"){s.push({method:e,args:[Ext.String.trim(v[2])]})}else{if(z==="."){s.push({method:k,args:[Ext.String.trim(v[2])]})}else{s.push({method:p,args:[Ext.String.trim(v[2]),Boolean(v[3])]})}}u=u.replace(v[0],"")}while(!(A=u.match(j))){for(w=0;u&&w<t;w++){x=c[w];B=u.match(x.re);r=x.method;if(B){s.push({method:Ext.isString(x.method)?Ext.functionFactory("items",Ext.String.format.apply(Ext.String,[r].concat(B.slice(1)))):x.method,args:B.slice(1)});u=u.replace(B[0],"");break}if(w===(t-1)){Ext.Error.raise('Invalid ComponentQuery selector: "'+arguments[0]+'"')}}}if(A[1]){s.push({mode:A[2]||A[1]});u=u.replace(A[0],"")}}return new i.Query({operations:s})}})});Ext.define("Ext.util.ProtoElement",(function(){var b=Ext.String.splitWords,a=Ext.Array.toMap;return{isProtoEl:true,clsProp:"cls",styleProp:"style",removedProp:"removed",styleIsText:false,constructor:function(c){var d=this;Ext.apply(d,c);d.classList=b(d.cls);d.classMap=a(d.classList);delete d.cls;if(Ext.isFunction(d.style)){d.styleFn=d.style;delete d.style}else{if(typeof d.style=="string"){d.style=Ext.Element.parseStyles(d.style)}else{if(d.style){d.style=Ext.apply({},d.style)}}}},flush:function(){this.flushClassList=[];this.removedClasses={};delete this.style;delete this.unselectableAttr},addCls:function(n){var l=this,m=(typeof n==="string")?b(n):n,e=m.length,j=l.classList,d=l.classMap,g=l.flushClassList,h=0,k;for(;h<e;++h){k=m[h];if(!d[k]){d[k]=true;j.push(k);if(g){g.push(k);delete l.removedClasses[k]}}}return l},hasCls:function(c){return c in this.classMap},removeCls:function(o){var n=this,l=n.classList,g=(n.classList=[]),j=a(b(o)),e=l.length,d=n.classMap,k=n.removedClasses,h,m;for(h=0;h<e;++h){m=l[h];if(j[m]){if(k){if(d[m]){k[m]=true;Ext.Array.remove(n.flushClassList,m)}}delete d[m]}else{g.push(m)}}return n},setStyle:function(g,e){var d=this,c=d.style||(d.style={});if(typeof g=="string"){if(arguments.length===1){d.setStyle(Ext.Element.parseStyles(g))}else{c[g]=e}}else{Ext.apply(c,g)}return d},unselectable:function(){this.addCls(Ext.dom.Element.unselectableCls);if(Ext.isOpera){this.unselectableAttr=true}},writeTo:function(h){var e=this,g=e.flushClassList||e.classList,d=e.removedClasses,c;if(e.styleFn){c=Ext.apply({},e.styleFn());Ext.apply(c,e.style)}else{c=e.style}h[e.clsProp]=g.join(" ");if(c){h[e.styleProp]=e.styleIsText?Ext.DomHelper.generateStyles(c):c}if(d){d=Ext.Object.getKeys(d);if(d.length){h[e.removedProp]=d.join(" ")}}if(e.unselectableAttr){h.unselectable="on"}return h}}}()));Ext.define("Ext.PluginManager",{extend:Ext.AbstractManager,alternateClassName:"Ext.PluginMgr",singleton:true,typeName:"ptype",create:function(b,d,c){var a;if(b.init){a=b}else{if(c){b=Ext.apply({},b);b.cmp=c}else{c=b.cmp}if(b.xclass){a=Ext.create(b)}else{a=Ext.ClassManager.getByAlias(("plugin."+(b.ptype||d)));if(typeof a==="function"){a=new a(b)}}}if(a&&c&&a.setCmp&&!a.setCmpCalled){a.setCmp(c);a.setCmpCalled=true}return a},findByType:function(c,g){var e=[],b=this.types,a,d;for(a in b){if(!b.hasOwnProperty(a)){continue}d=b[a];if(d.type==c&&(!g||(g===true&&d.isDefault))){e.push(d)}}return e}},function(){Ext.preg=function(){return Ext.PluginManager.registerType.apply(Ext.PluginManager,arguments)}});Ext.define("Ext.util.Filter",{id:null,anyMatch:false,exactMatch:false,caseSensitive:false,disabled:false,operator:null,statics:{createFilterFn:function(a){return a&&a.length?function(e){var d=true,g=a.length,b,c;for(b=0;d&&b<g;b++){c=a[b];if(!c.disabled){d=d&&c.filterFn.call(c.scope||c,e)}}return d}:function(){return true}}},operatorFns:{"<":function(a){return Ext.coerce(this.getRoot(a)[this.property],this.value)<this.value},"<=":function(a){return Ext.coerce(this.getRoot(a)[this.property],this.value)<=this.value},"=":function(a){return Ext.coerce(this.getRoot(a)[this.property],this.value)==this.value},">=":function(a){return Ext.coerce(this.getRoot(a)[this.property],this.value)>=this.value},">":function(a){return Ext.coerce(this.getRoot(a)[this.property],this.value)>this.value},"!=":function(a){return Ext.coerce(this.getRoot(a)[this.property],this.value)!=this.value}},constructor:function(a){var b=this;b.initialConfig=a;Ext.apply(b,a);b.filter=b.filter||b.filterFn;if(b.filter===undefined){b.setValue(a.value)}},setValue:function(b){var a=this;a.value=b;if(a.property===undefined||a.value===undefined){}else{a.filter=a.createFilterFn()}a.filterFn=a.filter},setFilterFn:function(a){this.filterFn=this.filter=a},createFilterFn:function(){var a=this,c=a.createValueMatcher(),b=a.property;if(a.operator){return a.operatorFns[a.operator]}else{return function(d){var e=a.getRoot(d)[b];return c===null?e===null:c.test(e)}}},getRoot:function(b){var a=this.root;return a===undefined?b:b[a]},createValueMatcher:function(){var d=this,e=d.value,g=d.anyMatch,c=d.exactMatch,a=d.caseSensitive,b=Ext.String.escapeRegex;if(e===null){return e}if(!e.exec){e=String(e);if(g===true){e=b(e)}else{e="^"+b(e);if(c===true){e+="$"}}e=new RegExp(e,a?"":"i")}return e},serialize:function(){var b=this,a=Ext.apply({},b.initialConfig);a.value=b.value;return a}},function(){this.prototype.operatorFns["=="]=this.prototype.operatorFns["="]});Ext.define("Ext.util.AbstractMixedCollection",{mixins:{observable:Ext.util.Observable},isMixedCollection:true,generation:0,indexGeneration:0,constructor:function(b,a){var c=this;if(arguments.length===1&&Ext.isObject(b)){c.initialConfig=b;Ext.apply(c,b)}else{c.allowFunctions=b===true;if(a){c.getKey=a}c.initialConfig={allowFunctions:c.allowFunctions,getKey:c.getKey}}c.items=[];c.map={};c.keys=[];c.indexMap={};c.length=0;c.mixins.observable.constructor.call(c)},allowFunctions:false,add:function(a,b){return this.insert(this.length,a,b)},getKey:function(a){return a.id},replace:function(c,e){var d=this,a,b;if(arguments.length==1){e=arguments[0];c=d.getKey(e)}a=d.map[c];if(typeof c=="undefined"||c===null||typeof a=="undefined"){return d.add(c,e)}d.generation++;b=d.indexOfKey(c);d.items[b]=e;d.map[c]=e;if(d.hasListeners.replace){d.fireEvent("replace",c,a,e)}return e},updateKey:function(g,h){var d=this,e=d.map,c=d.indexMap,a=d.indexOfKey(g),b;if(a>-1){b=e[g];delete e[g];delete c[g];e[h]=b;c[h]=a;d.keys[a]=h;d.generation++}},addAll:function(c){var b=this,a;if(arguments.length>1||Ext.isArray(c)){b.insert(b.length,arguments.length>1?arguments:c)}else{for(a in c){if(c.hasOwnProperty(a)){if(b.allowFunctions||typeof c[a]!="function"){b.add(a,c[a])}}}}},each:function(e,d){var b=Ext.Array.push([],this.items),c=0,a=b.length,g;for(;c<a;c++){g=b[c];if(e.call(d||g,g,c,a)===false){break}}},eachKey:function(e,d){var g=this.keys,b=this.items,c=0,a=g.length;for(;c<a;c++){e.call(d||window,g[c],b[c],c,a)}},findBy:function(e,d){var g=this.keys,b=this.items,c=0,a=b.length;for(;c<a;c++){if(e.call(d||window,b[c],g[c])){return b[c]}}return null},find:function(){if(Ext.isDefined(Ext.global.console)){Ext.global.console.warn("Ext.util.MixedCollection: find has been deprecated. Use findBy instead.")}return this.findBy.apply(this,arguments)},insert:function(a,b,c){if(Ext.isIterable(b)){return this.doInsert(a,b,c)}return(c?this.doInsert(a,[b],[c]):this.doInsert(a,[b]))[0]},doInsert:function(g,l,k){var j=this,a,b,e,h=l.length,d=j.hasListeners.add,c;if(k!=null){j.useLinearSearch=true}else{k=l;l=new Array(h);for(e=0;e<h;e++){l[e]=this.getKey(k[e])}}j.suspendEvents();for(e=0;e<h;e++){b=j.indexOfKey(l[e]);if(b!==-1){if(b<g){g--}j.removeAt(b)}}j.resumeEvents();c=g===j.length&&j.indexGeneration===j.generation;Ext.Array.insert(j.items,g,k);Ext.Array.insert(j.keys,g,l);j.length+=h;j.generation++;if(c){j.indexGeneration=j.generation}for(e=0;e<h;e++,g++){a=l[e];if(a!=null){j.map[a]=k[e];if(c){j.indexMap[a]=g}}if(d){j.fireEvent("add",g,k[e],a)}}return k},remove:function(d){var c=this,b,a;if(!c.useLinearSearch&&(b=c.getKey(d))){a=c.indexOfKey(b)}else{a=Ext.Array.indexOf(c.items,d)}return(a===-1)?false:c.removeAt(a)},removeAll:function(a){var c=this,b;if(a||c.hasListeners.remove){if(a){for(b=a.length-1;b>=0;--b){c.remove(a[b])}}else{while(c.length){c.removeAt(0)}}}else{c.length=c.items.length=c.keys.length=0;c.map={};c.indexMap={};c.generation++;c.indexGeneration=c.generation}},removeAt:function(a){var c=this,d,b;if(a<c.length&&a>=0){c.length--;d=c.items[a];Ext.Array.erase(c.items,a,1);b=c.keys[a];if(typeof b!="undefined"){delete c.map[b]}Ext.Array.erase(c.keys,a,1);if(c.hasListeners.remove){c.fireEvent("remove",d,b)}c.generation++;return d}return false},removeRange:function(h,a){var j=this,b,k,g,e,c,d;if(h<j.length&&h>=0){if(!a){a=1}e=Math.min(h+a,j.length);a=e-h;d=e===j.length;c=d&&j.indexGeneration===j.generation;for(g=h;g<e;g++){k=j.keys[g];if(k!=null){delete j.map[k];if(c){delete j.indexMap[k]}}}b=j.items[g-1];j.length-=a;j.generation++;if(c){j.indexGeneration=j.generation}if(d){j.items.length=j.keys.length=j.length}else{j.items.splice(h,a);j.keys.splice(h,a)}return b}return false},removeAtKey:function(b){var d=this,c=d.keys,a;if(b==null){for(a=c.length-1;a>=0;a--){if(c[a]==null){d.removeAt(a)}}}else{return d.removeAt(d.indexOfKey(b))}},getCount:function(){return this.length},indexOf:function(c){var b=this,a;if(c!=null){if(!b.useLinearSearch&&(a=b.getKey(c))){return this.indexOfKey(a)}return Ext.Array.indexOf(b.items,c)}return -1},indexOfKey:function(a){if(this.map[a]==null){return -1}if(this.indexGeneration!==this.generation){this.rebuildIndexMap()}return this.indexMap[a]},rebuildIndexMap:function(){var e=this,d=e.indexMap={},c=this.keys,a=c.length,b;for(b=0;b<a;b++){d[c[b]]=b}e.indexGeneration=e.generation},get:function(b){var d=this,a=d.map[b],c=a!==undefined?a:(typeof b=="number")?d.items[b]:undefined;return typeof c!="function"||d.allowFunctions?c:null},getAt:function(a){return this.items[a]},getByKey:function(a){return this.map[a]},contains:function(c){var b=this,a;if(c!=null){if(!b.useLinearSearch&&(a=b.getKey(c))){return this.map[a]!=null}return Ext.Array.indexOf(this.items,c)!==-1}return false},containsKey:function(a){return this.map[a]!=null},clear:function(){var a=this;a.length=0;a.items=[];a.keys=[];a.map={};a.indexMap={};a.generation++;a.indexGeneration=a.generation;if(a.hasListeners.clear){a.fireEvent("clear")}},first:function(){return this.items[0]},last:function(){return this.items[this.length-1]},sum:function(h,b,j,a){var c=this.extractValues(h,b),g=c.length,e=0,d;j=j||0;a=(a||a===0)?a:g-1;for(d=j;d<=a;d++){e+=c[d]}return e},collect:function(k,e,h){var l=this.extractValues(k,e),a=l.length,b={},c=[],j,g,d;for(d=0;d<a;d++){j=l[d];g=String(j);if((h||!Ext.isEmpty(j))&&!b[g]){b[g]=true;c.push(j)}}return c},extractValues:function(c,a){var b=this.items;if(a){b=Ext.Array.pluck(b,a)}return Ext.Array.pluck(b,c)},hasRange:function(b,a){return(a<this.length)},getRange:function(g,a){var e=this,c=e.items,b=[],d;if(c.length<1){return b}g=g||0;a=Math.min(a==null?e.length-1:a,e.length-1);if(g<=a){return c.slice(g,a+1)}else{for(d=g;d>=a;d--){b[b.length]=c[d]}}return b},filter:function(d,c,e,a){var b=[];if(Ext.isString(d)){b.push(new Ext.util.Filter({property:d,value:c,anyMatch:e,caseSensitive:a}))}else{if(Ext.isArray(d)||d instanceof Ext.util.Filter){b=b.concat(d)}}return this.filterBy(Ext.util.Filter.createFilterFn(b))},filterBy:function(e,d){var j=this,a=new j.self(j.initialConfig),h=j.keys,b=j.items,g=b.length,c;a.getKey=j.getKey;for(c=0;c<g;c++){if(e.call(d||j,b[c],h[c])){a.add(h[c],b[c])}}return a},findIndex:function(c,b,e,d,a){if(Ext.isEmpty(b,false)){return -1}b=this.createValueMatcher(b,d,a);return this.findIndexBy(function(g){return g&&b.test(g[c])},null,e)},findIndexBy:function(e,d,j){var h=this,g=h.keys,b=h.items,c=j||0,a=b.length;for(;c<a;c++){if(e.call(d||h,b[c],g[c])){return c}}return -1},createValueMatcher:function(c,e,a,b){if(!c.exec){var d=Ext.String.escapeRegex;c=String(c);if(e===true){c=d(c)}else{c="^"+d(c);if(b===true){c+="$"}}c=new RegExp(c,a?"":"i")}return c},clone:function(){var a=this,b=new this.self(a.initialConfig);b.add(a.keys,a.items);return b}});Ext.define("Ext.util.Sorter",{direction:"ASC",constructor:function(a){var b=this;Ext.apply(b,a);b.updateSortFunction()},createSortFunction:function(b){var c=this,d=c.direction||"ASC",a=d.toUpperCase()=="DESC"?-1:1;return function(g,e){return a*b.call(c,g,e)}},defaultSorterFn:function(d,c){var b=this,a=b.transform,g=b.getRoot(d)[b.property],e=b.getRoot(c)[b.property];if(a){g=a(g);e=a(e)}return g>e?1:(g<e?-1:0)},getRoot:function(a){return this.root===undefined?a:a[this.root]},setDirection:function(b){var a=this;a.direction=b?b.toUpperCase():b;a.updateSortFunction()},toggle:function(){var a=this;a.direction=Ext.String.toggle(a.direction,"ASC","DESC");a.updateSortFunction()},updateSortFunction:function(a){var b=this;a=a||b.sorterFn||b.defaultSorterFn;b.sort=b.createSortFunction(a)},serialize:function(){return{root:this.root,property:this.property,direction:this.direction}}});Ext.define("Ext.util.Sortable",{isSortable:true,defaultSortDirection:"ASC",statics:{createComparator:function(a){return a&&a.length?function(d,c){var b=a[0].sort(d,c),g=a.length,e=1;for(;e<g;e++){b=b||a[e].sort.call(this,d,c)}return b}:function(){return 0}}},initSortable:function(){var a=this,b=a.sorters;a.sorters=new Ext.util.AbstractMixedCollection(false,function(c){return c.id||c.property});if(b){a.sorters.addAll(a.decodeSorters(b))}},sort:function(g,e,b,d){var c=this,h,a;if(Ext.isArray(g)){d=b;b=e;a=g}else{if(Ext.isObject(g)){d=b;b=e;a=[g]}else{if(Ext.isString(g)){h=c.sorters.get(g);if(!h){h={property:g,direction:e};a=[h]}else{if(e===undefined){h.toggle()}else{h.setDirection(e)}}}}}if(a&&a.length){a=c.decodeSorters(a);if(Ext.isString(b)){if(b==="prepend"){c.sorters.insert(0,a)}else{c.sorters.addAll(a)}}else{c.sorters.clear();c.sorters.addAll(a)}}if(d!==false){c.fireEvent("beforesort",c,a);c.onBeforeSort(a);g=c.sorters.items;if(g.length){c.doSort(c.generateComparator())}}return g},generateComparator:function(){var a=this.sorters.getRange();return a.length?this.createComparator(a):this.emptyComparator},emptyComparator:function(){return 0},onBeforeSort:Ext.emptyFn,decodeSorters:function(g){if(!Ext.isArray(g)){if(g===undefined){g=[]}else{g=[g]}}var d=g.length,h=Ext.util.Sorter,a=this.model?this.model.prototype.fields:null,e,b,c;for(c=0;c<d;c++){b=g[c];if(!(b instanceof h)){if(Ext.isString(b)){b={property:b}}Ext.applyIf(b,{root:this.sortRoot,direction:"ASC"});if(b.fn){b.sorterFn=b.fn}if(typeof b=="function"){b={sorterFn:b}}if(a&&!b.transform){e=a.get(b.property);b.transform=e&&e.sortType!==Ext.identityFn?e.sortType:undefined}g[c]=new Ext.util.Sorter(b)}}return g},getSorters:function(){return this.sorters.items},getFirstSorter:function(){var c=this.sorters.items,a=c.length,b=0,d;for(;b<a;++b){d=c[b];if(!d.isGrouper){return d}}return null}},function(){this.prototype.createComparator=this.createComparator});Ext.define("Ext.util.MixedCollection",{extend:Ext.util.AbstractMixedCollection,mixins:{sortable:Ext.util.Sortable},constructor:function(){var a=this;a.callParent(arguments);a.addEvents("sort");a.mixins.sortable.initSortable.call(a)},doSort:function(a){this.sortBy(a)},_sort:function(m,b,l){var k=this,e,g,d=String(b).toUpperCase()=="DESC"?-1:1,j=[],n=k.keys,h=k.items,a;l=l||function(i,c){return i-c};for(e=0,g=h.length;e<g;e++){j[j.length]={key:n[e],value:h[e],index:e}}Ext.Array.sort(h,function(i,c){return l(i[m],c[m])*d||(i.index<c.index?-1:1)});for(e=0,g=j.length;e<g;e++){a=j[e];h[e]=a.value;n[e]=a.key;k.indexMap[a.key]=e}k.generation++;k.indexGeneration=k.generation;k.fireEvent("sort",k)},sortBy:function(b){var j=this,a=j.items,h,g=j.keys,d,e=a.length,c;for(c=0;c<e;c++){a[c].$extCollectionIndex=c}Ext.Array.sort(a,function(k,i){return b(k,i)||(k.$extCollectionIndex<i.$extCollectionIndex?-1:1)});for(c=0;c<e;c++){h=a[c];d=j.getKey(h);g[c]=d;j.indexMap[d]=c;delete a.$extCollectionIndex}j.generation++;j.indexGeneration=j.generation;j.fireEvent("sort",j,a,g)},findInsertionIndex:function(e,d){var g=this,b=g.items,i=0,a=b.length-1,c,h;if(!d){d=g.generateComparator()}while(i<=a){c=(i+a)>>1;h=d(e,b[c]);if(h>=0){i=c+1}else{if(h<0){a=c-1}}}return i},reorder:function(d){var h=this,b=h.items,c=0,g=b.length,a=[],e=[],i;h.suspendEvents();for(i in d){a[d[i]]=b[i]}for(c=0;c<g;c++){if(d[c]==undefined){e.push(b[c])}}for(c=0;c<g;c++){if(a[c]==undefined){a[c]=e.shift()}}h.clear();h.addAll(a);h.resumeEvents();h.fireEvent("sort",h)},sortByKey:function(a,b){this._sort("key",a,b||function(d,c){var g=String(d).toUpperCase(),e=String(c).toUpperCase();return g>e?1:(g<e?-1:0)})}});Ext.define("Ext.fx.target.Target",{isAnimTarget:true,constructor:function(a){this.target=a;this.id=this.getId()},getId:function(){return this.target.id}});Ext.define("Ext.fx.target.Element",{extend:Ext.fx.target.Target,type:"element",getElVal:function(b,a,c){if(c==undefined){if(a==="x"){c=b.getX()}else{if(a==="y"){c=b.getY()}else{if(a==="scrollTop"){c=b.getScroll().top}else{if(a==="scrollLeft"){c=b.getScroll().left}else{if(a==="height"){c=b.getHeight()}else{if(a==="width"){c=b.getWidth()}else{c=b.getStyle(a)}}}}}}}return c},getAttr:function(a,c){var b=this.target;return[[b,this.getElVal(b,a,c)]]},setAttr:function(k){var e=this.target,h=k.length,l,g,b,d,c,a;for(d=0;d<h;d++){l=k[d].attrs;for(g in l){if(l.hasOwnProperty(g)){a=l[g].length;for(c=0;c<a;c++){b=l[g][c];this.setElVal(b[0],g,b[1])}}}}},setElVal:function(b,a,c){if(a==="x"){b.setX(c)}else{if(a==="y"){b.setY(c)}else{if(a==="scrollTop"){b.scrollTo("top",c)}else{if(a==="scrollLeft"){b.scrollTo("left",c)}else{if(a==="width"){b.setWidth(c)}else{if(a==="height"){b.setHeight(c)}else{b.setStyle(a,c)}}}}}}}});Ext.define("Ext.fx.target.ElementCSS",{extend:Ext.fx.target.Element,setAttr:function(n,e){var q={attrs:[],duration:[],easing:[]},m=n.length,g,p,k,l,c,b,h,d,a;for(h=0;h<m;h++){p=n[h];c=p.duration;l=p.easing;p=p.attrs;for(k in p){if(Ext.Array.indexOf(q.attrs,k)==-1){q.attrs.push(k.replace(/[A-Z]/g,function(i){return"-"+i.toLowerCase()}));q.duration.push(c+"ms");q.easing.push(l)}}}g=q.attrs.join(",");c=q.duration.join(",");l=q.easing.join(", ");for(h=0;h<m;h++){p=n[h].attrs;for(k in p){a=p[k].length;for(d=0;d<a;d++){b=p[k][d];b[0].setStyle(Ext.supports.CSS3Prefix+"TransitionProperty",e?"":g);b[0].setStyle(Ext.supports.CSS3Prefix+"TransitionDuration",e?"":c);b[0].setStyle(Ext.supports.CSS3Prefix+"TransitionTimingFunction",e?"":l);b[0].setStyle(k,b[1]);if(e){b=b[0].dom.offsetWidth}else{b[0].on(Ext.supports.CSS3TransitionEnd,function(){this.setStyle(Ext.supports.CSS3Prefix+"TransitionProperty",null);this.setStyle(Ext.supports.CSS3Prefix+"TransitionDuration",null);this.setStyle(Ext.supports.CSS3Prefix+"TransitionTimingFunction",null)},b[0],{single:true})}}}}}});Ext.define("Ext.fx.target.CompositeElement",{extend:Ext.fx.target.Element,isComposite:true,constructor:function(a){a.id=a.id||Ext.id(null,"ext-composite-");this.callParent([a])},getAttr:function(a,j){var b=[],h=this.target,g=h.elements,e=g.length,c,d;for(c=0;c<e;c++){d=g[c];if(d){d=h.getElement(d);b.push([d,this.getElVal(d,a,j)])}}return b},setAttr:function(n){var l=this.target,m=n.length,b=l.elements,r=b.length,p,d,q,h,c,g,e,a;for(g=0;g<m;g++){q=n[g].attrs;for(h in q){if(q.hasOwnProperty(h)){a=q[h].length;for(e=0;e<a;e++){p=q[h][e][1];for(d=0;d<r;++d){el=b[d];if(el){el=l.getElement(el);this.setElVal(el,h,p)}}}}}}}});Ext.define("Ext.fx.target.CompositeElementCSS",{extend:Ext.fx.target.CompositeElement,setAttr:function(){return Ext.fx.target.ElementCSS.prototype.setAttr.apply(this,arguments)}});Ext.define("Ext.fx.target.Sprite",{extend:Ext.fx.target.Target,type:"draw",getFromPrim:function(b,a){var c;switch(a){case"rotate":case"rotation":c=b.attr.rotation;return{x:c.x||0,y:c.y||0,degrees:c.degrees||0};case"scale":case"scaling":c=b.attr.scaling;return{x:c.x||1,y:c.y||1,cx:c.cx||0,cy:c.cy||0};case"translate":case"translation":c=b.attr.translation;return{x:c.x||0,y:c.y||0};default:return b.attr[a]}},getAttr:function(a,b){return[[this.target,b!=undefined?b:this.getFromPrim(this.target,a)]]},setAttr:function(m){var g=m.length,k=[],b,e,p,r,q,o,n,d,c,l,h,a;for(d=0;d<g;d++){b=m[d].attrs;for(e in b){p=b[e];a=p.length;for(c=0;c<a;c++){q=p[c][0];r=p[c][1];if(e==="translate"||e==="translation"){n={x:r.x,y:r.y}}else{if(e==="rotate"||e==="rotation"){l=r.x;if(isNaN(l)){l=null}h=r.y;if(isNaN(h)){h=null}n={degrees:r.degrees,x:l,y:h}}else{if(e==="scale"||e==="scaling"){l=r.x;if(isNaN(l)){l=null}h=r.y;if(isNaN(h)){h=null}n={x:l,y:h,cx:r.cx,cy:r.cy}}else{if(e==="width"||e==="height"||e==="x"||e==="y"){n=parseFloat(r)}else{n=r}}}}o=Ext.Array.indexOf(k,q);if(o==-1){k.push([q,{}]);o=k.length-1}k[o][1][e]=n}}}g=k.length;for(d=0;d<g;d++){k[d][0].setAttributes(k[d][1])}this.target.redraw()}});Ext.define("Ext.fx.target.CompositeSprite",{extend:Ext.fx.target.Sprite,getAttr:function(a,h){var b=[],g=[].concat(this.target.items),e=g.length,d,c;for(d=0;d<e;d++){c=g[d];b.push([c,h!=undefined?h:this.getFromPrim(c,a)])}return b}});Ext.define("Ext.fx.target.Component",{extend:Ext.fx.target.Target,type:"component",getPropMethod:{top:function(){return this.getPosition(true)[1]},left:function(){return this.getPosition(true)[0]},x:function(){return this.getPosition()[0]},y:function(){return this.getPosition()[1]},height:function(){return this.getHeight()},width:function(){return this.getWidth()},opacity:function(){return this.el.getStyle("opacity")}},setMethods:{top:"setPosition",left:"setPosition",x:"setPagePosition",y:"setPagePosition",height:"setSize",width:"setSize",opacity:"setOpacity"},getAttr:function(a,b){return[[this.target,b!==undefined?b:this.getPropMethod[a].call(this.target)]]},setAttr:function(s,g,b){var q=this,p=s.length,v,n,c,k,e,m,d,r,u,l,a={},t;for(k=0;k<p;k++){v=s[k].attrs;for(n in v){m=v[n].length;for(e=0;e<m;e++){c=v[n][e];t=a[q.setMethods[n]]||(a[q.setMethods[n]]={});t.target=c[0];t[n]=c[1]}}if(a.setPosition){c=a.setPosition;d=(c.left===undefined)?undefined:parseFloat(c.left);r=(c.top===undefined)?undefined:parseFloat(c.top);c.target.setPosition(d,r)}if(a.setPagePosition){c=a.setPagePosition;c.target.setPagePosition(c.x,c.y)}if(a.setSize){c=a.setSize;u=(c.width===undefined)?c.target.getWidth():parseFloat(c.width);l=(c.height===undefined)?c.target.getHeight():parseFloat(c.height);c.target.el.setSize(u,l);if(b||q.dynamic){Ext.globalEvents.on({idle:Ext.Function.bind(c.target.setSize,c.target,[u,l]),single:true})}}if(a.setOpacity){c=a.setOpacity;c.target.el.setStyle("opacity",c.opacity)}}}});Ext.define("Ext.fx.Queue",{constructor:function(){this.targets=new Ext.util.HashMap();this.fxQueue={}},getFxDefaults:function(a){var b=this.targets.get(a);if(b){return b.fxDefaults}return{}},setFxDefaults:function(a,c){var b=this.targets.get(a);if(b){b.fxDefaults=Ext.apply(b.fxDefaults||{},c)}},stopAnimation:function(b){var d=this,a=d.getFxQueue(b),c=a.length;while(c){a[c-1].end();c--}},getActiveAnimation:function(b){var a=this.getFxQueue(b);return(a&&!!a.length)?a[0]:false},hasFxBlock:function(b){var a=this.getFxQueue(b);return a&&a[0]&&a[0].block},getFxQueue:function(b){if(!b){return false}var c=this,a=c.fxQueue[b],d=c.targets.get(b);if(!d){return false}if(!a){c.fxQueue[b]=[];if(d.type!="element"){d.target.on("destroy",function(){c.fxQueue[b]=[]})}}return c.fxQueue[b]},queueFx:function(d){var c=this,e=d.target,a,b;if(!e){return}a=c.getFxQueue(e.getId());b=a.length;if(b){if(d.concurrent){d.paused=false}else{a[b-1].on("afteranimate",function(){d.paused=false})}}else{d.paused=false}d.on("afteranimate",function(){Ext.Array.remove(a,d);if(d.remove){if(e.type=="element"){var g=Ext.get(e.id);if(g){g.remove()}}}},this);a.push(d)}});Ext.define("Ext.fx.Manager",{singleton:true,mixins:{queue:Ext.fx.Queue},constructor:function(){var a=this;a.items=new Ext.util.MixedCollection();a.mixins.queue.constructor.call(a);a.taskRunner=new Ext.util.TaskRunner()},interval:16,forceJS:true,createTarget:function(d){var b=this,c=!b.forceJS&&Ext.supports.Transitions,a;b.useCSS3=c;if(d){if(d.tagName||Ext.isString(d)||d.isFly){d=Ext.get(d);a=new Ext.fx.target["Element"+(c?"CSS":"")](d)}else{if(d.dom){a=new Ext.fx.target["Element"+(c?"CSS":"")](d)}else{if(d.isComposite){a=new Ext.fx.target["CompositeElement"+(c?"CSS":"")](d)}else{if(d.isSprite){a=new Ext.fx.target.Sprite(d)}else{if(d.isCompositeSprite){a=new Ext.fx.target.CompositeSprite(d)}else{if(d.isComponent){a=new Ext.fx.target.Component(d)}else{if(d.isAnimTarget){return d}else{return null}}}}}}}b.targets.add(a);return a}else{return null}},addAnim:function(d){var c=this,b=c.items,a=c.task;b.add(d.id,d);if(!a&&b.length){a=c.task={run:c.runner,interval:c.interval,scope:c};c.taskRunner.start(a)}},removeAnim:function(d){var c=this,b=c.items,a=c.task;b.removeAtKey(d.id);if(a&&!b.length){c.taskRunner.stop(a);delete c.task}},runner:function(){var d=this,b=d.items.getRange(),c=0,a=b.length,e;d.targetArr={};d.timestamp=new Date();for(;c<a;c++){e=b[c];if(e.isReady()){d.startAnim(e)}}for(c=0;c<a;c++){e=b[c];if(e.isRunning()){d.runAnim(e)}}d.applyPendingAttrs()},startAnim:function(a){a.start(this.timestamp)},runAnim:function(d){if(!d){return}var c=this,g=c.useCSS3&&d.target.type=="element",a=c.timestamp-d.startTime,b=(a>=d.duration),e,h;e=this.collectTargetData(d,a,g,b);if(g){d.target.setAttr(e.anims[d.id].attributes,true);c.collectTargetData(d,d.duration,g,b);d.paused=true;e=d.target.target;if(d.target.isComposite){e=d.target.target.last()}h={};h[Ext.supports.CSS3TransitionEnd]=d.lastFrame;h.scope=d;h.single=true;e.on(h)}},collectTargetData:function(c,a,e,g){var b=c.target.getId(),d=this.targetArr[b];if(!d){d=this.targetArr[b]={id:b,el:c.target,anims:{}}}d.anims[c.id]={id:c.id,anim:c,elapsed:a,isLastFrame:g,attributes:[{duration:c.duration,easing:(e&&c.reverse)?c.easingFn.reverse().toCSS3():c.easing,attrs:c.runAnim(a)}]};return d},applyPendingAttrs:function(){var e=this.targetArr,g,c,b,d,a;for(c in e){if(e.hasOwnProperty(c)){g=e[c];for(a in g.anims){if(g.anims.hasOwnProperty(a)){b=g.anims[a];d=b.anim;if(b.attributes&&d.isRunning()){g.el.setAttr(b.attributes,false,b.isLastFrame);if(b.isLastFrame){d.lastFrame()}}}}}}}});Ext.define("Ext.fx.Animator",{mixins:{observable:Ext.util.Observable},isAnimator:true,duration:250,delay:0,delayStart:0,dynamic:false,easing:"ease",running:false,paused:false,damper:1,iterations:1,currentIteration:0,keyframeStep:0,animKeyFramesRE:/^(from|to|\d+%?)$/,constructor:function(a){var b=this;a=Ext.apply(b,a||{});b.config=a;b.id=Ext.id(null,"ext-animator-");b.addEvents("beforeanimate","keyframe","afteranimate");b.mixins.observable.constructor.call(b,a);b.timeline=[];b.createTimeline(b.keyframes);if(b.target){b.applyAnimator(b.target);Ext.fx.Manager.addAnim(b)}},sorter:function(d,c){return d.pct-c.pct},createTimeline:function(d){var h=this,l=[],j=h.to||{},b=h.duration,m,a,c,g,k,e;for(k in d){if(d.hasOwnProperty(k)&&h.animKeyFramesRE.test(k)){e={attrs:Ext.apply(d[k],j)};if(k=="from"){k=0}else{if(k=="to"){k=100}}e.pct=parseInt(k,10);l.push(e)}}Ext.Array.sort(l,h.sorter);g=l.length;for(c=0;c<g;c++){m=(l[c-1])?b*(l[c-1].pct/100):0;a=b*(l[c].pct/100);h.timeline.push({duration:a-m,attrs:l[c].attrs})}},applyAnimator:function(d){var h=this,j=[],l=h.timeline,g=l.length,b,e,a,k,c;if(h.fireEvent("beforeanimate",h)!==false){for(c=0;c<g;c++){b=l[c];k=b.attrs;e=k.easing||h.easing;a=k.damper||h.damper;delete k.easing;delete k.damper;b=new Ext.fx.Anim({target:d,easing:e,damper:a,duration:b.duration,paused:true,to:k});j.push(b)}h.animations=j;h.target=b.target;for(c=0;c<g-1;c++){b=j[c];b.nextAnim=j[c+1];b.on("afteranimate",function(){this.nextAnim.paused=false});b.on("afteranimate",function(){this.fireEvent("keyframe",this,++this.keyframeStep)},h)}j[g-1].on("afteranimate",function(){this.lastFrame()},h)}},start:function(d){var e=this,c=e.delay,b=e.delayStart,a;if(c){if(!b){e.delayStart=d;return}else{a=d-b;if(a<c){return}else{d=new Date(b.getTime()+c)}}}if(e.fireEvent("beforeanimate",e)!==false){e.startTime=d;e.running=true;e.animations[e.keyframeStep].paused=false}},lastFrame:function(){var c=this,a=c.iterations,b=c.currentIteration;b++;if(b<a){c.startTime=new Date();c.currentIteration=b;c.keyframeStep=0;c.applyAnimator(c.target);c.animations[c.keyframeStep].paused=false}else{c.currentIteration=0;c.end()}},end:function(){var a=this;a.fireEvent("afteranimate",a,a.startTime,new Date()-a.startTime)},isReady:function(){return this.paused===false&&this.running===false&&this.iterations>0},isRunning:function(){return false}});Ext.define("Ext.fx.CubicBezier",{singleton:true,cubicBezierAtTime:function(o,d,b,n,m,i){var j=3*d,l=3*(n-d)-j,a=1-j-l,h=3*b,k=3*(m-b)-h,p=1-h-k;function g(q){return((a*q+l)*q+j)*q}function c(q,s){var r=e(q,s);return((p*r+k)*r+h)*r}function e(q,y){var w,v,t,r,u,s;for(t=q,s=0;s<8;s++){r=g(t)-q;if(Math.abs(r)<y){return t}u=(3*a*t+2*l)*t+j;if(Math.abs(u)<0.000001){break}t=t-r/u}w=0;v=1;t=q;if(t<w){return w}if(t>v){return v}while(w<v){r=g(t);if(Math.abs(r-q)<y){return t}if(q>r){w=t}else{v=t}t=(v-w)/2+w}return t}return c(o,1/(200*i))},cubicBezier:function(b,e,a,c){var d=function(g){return Ext.fx.CubicBezier.cubicBezierAtTime(g,b,e,a,c,1)};d.toCSS3=function(){return"cubic-bezier("+[b,e,a,c].join(",")+")"};d.reverse=function(){return Ext.fx.CubicBezier.cubicBezier(1-a,1-c,1-b,1-e)};return d}});Ext.require("Ext.fx.CubicBezier",function(){var e=Math,h=e.PI,d=e.pow,b=e.sin,g=e.sqrt,a=e.abs,c=1.70158;Ext.define("Ext.fx.Easing",{singleton:true,linear:Ext.identityFn,ease:function(l){var i=0.07813-l/2,m=-0.25,o=g(0.0066+i*i),r=o-i,k=d(a(r),1/3)*(r<0?-1:1),p=-o-i,j=d(a(p),1/3)*(p<0?-1:1),s=k+j+0.25;return d(1-s,2)*3*s*0.1+(1-s)*3*s*s+s*s*s},easeIn:function(i){return d(i,1.7)},easeOut:function(i){return d(i,0.48)},easeInOut:function(r){var l=0.48-r/1.04,k=g(0.1734+l*l),i=k-l,p=d(a(i),1/3)*(i<0?-1:1),o=-k-l,m=d(a(o),1/3)*(o<0?-1:1),j=p+m+0.5;return(1-j)*3*j*j+j*j*j},backIn:function(i){return i*i*((c+1)*i-c)},backOut:function(i){i=i-1;return i*i*((c+1)*i+c)+1},elasticIn:function(k){if(k===0||k===1){return k}var j=0.3,i=j/4;return d(2,-10*k)*b((k-i)*(2*h)/j)+1},elasticOut:function(i){return 1-Ext.fx.Easing.elasticIn(1-i)},bounceIn:function(i){return 1-Ext.fx.Easing.bounceOut(1-i)},bounceOut:function(m){var j=7.5625,k=2.75,i;if(m<(1/k)){i=j*m*m}else{if(m<(2/k)){m-=(1.5/k);i=j*m*m+0.75}else{if(m<(2.5/k)){m-=(2.25/k);i=j*m*m+0.9375}else{m-=(2.625/k);i=j*m*m+0.984375}}}return i}},function(){var j=Ext.fx.Easing.self,i=j.prototype;j.implement({"back-in":i.backIn,"back-out":i.backOut,"ease-in":i.easeIn,"ease-out":i.easeOut,"elastic-in":i.elasticIn,"elastic-out":i.elasticOut,"bounce-in":i.bounceIn,"bounce-out":i.bounceOut,"ease-in-out":i.easeInOut})})});Ext.define("Ext.draw.Color",{colorToHexRe:/(.*?)rgb\((\d+),\s*(\d+),\s*(\d+)\)/,rgbRe:/\s*rgb\s*\(\s*([0-9]+)\s*,\s*([0-9]+)\s*,\s*([0-9]+)\s*\)\s*/,hexRe:/\s*#([0-9a-fA-F][0-9a-fA-F]?)([0-9a-fA-F][0-9a-fA-F]?)([0-9a-fA-F][0-9a-fA-F]?)\s*/,lightnessFactor:0.2,constructor:function(d,c,a){var b=this,e=Ext.Number.constrain;b.r=e(d,0,255);b.g=e(c,0,255);b.b=e(a,0,255)},getRed:function(){return this.r},getGreen:function(){return this.g},getBlue:function(){return this.b},getRGB:function(){var a=this;return[a.r,a.g,a.b]},getHSL:function(){var j=this,a=j.r/255,i=j.g/255,k=j.b/255,m=Math.max(a,i,k),d=Math.min(a,i,k),n=m-d,e,o=0,c=0.5*(m+d);if(d!=m){o=(c<0.5)?n/(m+d):n/(2-m-d);if(a==m){e=60*(i-k)/n}else{if(i==m){e=120+60*(k-a)/n}else{e=240+60*(a-i)/n}}if(e<0){e+=360}if(e>=360){e-=360}}return[e,o,c]},getLighter:function(b){var a=this.getHSL();b=b||this.lightnessFactor;a[2]=Ext.Number.constrain(a[2]+b,0,1);return this.fromHSL(a[0],a[1],a[2])},getDarker:function(a){a=a||this.lightnessFactor;return this.getLighter(-a)},toString:function(){var h=this,c=Math.round,e=c(h.r).toString(16),d=c(h.g).toString(16),a=c(h.b).toString(16);e=(e.length==1)?"0"+e:e;d=(d.length==1)?"0"+d:d;a=(a.length==1)?"0"+a:a;return["#",e,d,a].join("")},toHex:function(b){if(Ext.isArray(b)){b=b[0]}if(!Ext.isString(b)){return""}if(b.substr(0,1)==="#"){return b}var e=this.colorToHexRe.exec(b),g,d,a,c;if(Ext.isArray(e)){g=parseInt(e[2],10);d=parseInt(e[3],10);a=parseInt(e[4],10);c=a|(d<<8)|(g<<16);return e[1]+"#"+("000000"+c.toString(16)).slice(-6)}else{return b}},fromString:function(i){var c,e,d,a,h=parseInt;if((i.length==4||i.length==7)&&i.substr(0,1)==="#"){c=i.match(this.hexRe);if(c){e=h(c[1],16)>>0;d=h(c[2],16)>>0;a=h(c[3],16)>>0;if(i.length==4){e+=(e*16);d+=(d*16);a+=(a*16)}}}else{c=i.match(this.rgbRe);if(c){e=c[1];d=c[2];a=c[3]}}return(typeof e=="undefined")?undefined:new Ext.draw.Color(e,d,a)},getGrayscale:function(){return this.r*0.3+this.g*0.59+this.b*0.11},fromHSL:function(g,o,d){var a,b,c,e,k=[],n=Math.abs,j=Math.floor;if(o==0||g==null){k=[d,d,d]}else{g/=60;a=o*(1-n(2*d-1));b=a*(1-n(g-2*j(g/2)-1));c=d-a/2;switch(j(g)){case 0:k=[a,b,0];break;case 1:k=[b,a,0];break;case 2:k=[0,a,b];break;case 3:k=[0,b,a];break;case 4:k=[b,0,a];break;case 5:k=[a,0,b];break}k=[k[0]+c,k[1]+c,k[2]+c]}return new Ext.draw.Color(k[0]*255,k[1]*255,k[2]*255)}},function(){var a=this.prototype;this.addStatics({fromHSL:function(){return a.fromHSL.apply(a,arguments)},fromString:function(){return a.fromString.apply(a,arguments)},toHex:function(){return a.toHex.apply(a,arguments)}})});Ext.define("Ext.draw.Draw",{singleton:true,pathToStringRE:/,?([achlmqrstvxz]),?/gi,pathCommandRE:/([achlmqstvz])[\s,]*((-?\d*\.?\d*(?:e[-+]?\d+)?\s*,?\s*)+)/ig,pathValuesRE:/(-?\d*\.?\d*(?:e[-+]?\d+)?)\s*,?\s*/ig,stopsRE:/^(\d+%?)$/,radian:Math.PI/180,availableAnimAttrs:{along:"along",blur:null,"clip-rect":"csv",cx:null,cy:null,fill:"color","fill-opacity":null,"font-size":null,height:null,opacity:null,path:"path",r:null,rotation:"csv",rx:null,ry:null,scale:"csv",stroke:"color","stroke-opacity":null,"stroke-width":null,translation:"csv",width:null,x:null,y:null},is:function(b,a){a=String(a).toLowerCase();return(a=="object"&&b===Object(b))||(a=="undefined"&&typeof b==a)||(a=="null"&&b===null)||(a=="array"&&Array.isArray&&Array.isArray(b))||(Object.prototype.toString.call(b).toLowerCase().slice(8,-1))==a},ellipsePath:function(b){var a=b.attr;return Ext.String.format("M{0},{1}A{2},{3},0,1,1,{0},{4}A{2},{3},0,1,1,{0},{1}z",a.x,a.y-a.ry,a.rx,a.ry,a.y+a.ry)},rectPath:function(b){var a=b.attr;if(a.radius){return Ext.String.format("M{0},{1}l{2},0a{3},{3},0,0,1,{3},{3}l0,{5}a{3},{3},0,0,1,{4},{3}l{6},0a{3},{3},0,0,1,{4},{4}l0,{7}a{3},{3},0,0,1,{3},{4}z",a.x+a.radius,a.y,a.width-a.radius*2,a.radius,-a.radius,a.height-a.radius*2,a.radius*2-a.width,a.radius*2-a.height)}else{return Ext.String.format("M{0},{1}L{2},{1},{2},{3},{0},{3}z",a.x,a.y,a.width+a.x,a.height+a.y)}},path2string:function(){return this.join(",").replace(Ext.draw.Draw.pathToStringRE,"$1")},pathToString:function(a){return a.join(",").replace(Ext.draw.Draw.pathToStringRE,"$1")},parsePathString:function(a){if(!a){return null}var d={a:7,c:6,h:1,l:2,m:2,q:4,s:4,t:2,v:1,z:0},c=[],b=this;if(b.is(a,"array")&&b.is(a[0],"array")){c=b.pathClone(a)}if(!c.length){String(a).replace(b.pathCommandRE,function(g,e,j){var i=[],h=e.toLowerCase();j.replace(b.pathValuesRE,function(l,k){k&&i.push(+k)});if(h=="m"&&i.length>2){c.push([e].concat(Ext.Array.splice(i,0,2)));h="l";e=(e=="m")?"l":"L"}while(i.length>=d[h]){c.push([e].concat(Ext.Array.splice(i,0,d[h])));if(!d[h]){break}}})}c.toString=b.path2string;return c},mapPath:function(l,g){if(!g){return l}var h,e,c,k,a,d,b;l=this.path2curve(l);for(c=0,k=l.length;c<k;c++){b=l[c];for(a=1,d=b.length;a<d-1;a+=2){h=g.x(b[a],b[a+1]);e=g.y(b[a],b[a+1]);b[a]=h;b[a+1]=e}}return l},pathClone:function(g){var c=[],a,e,b,d;if(!this.is(g,"array")||!this.is(g&&g[0],"array")){g=this.parsePathString(g)}for(b=0,d=g.length;b<d;b++){c[b]=[];for(a=0,e=g[b].length;a<e;a++){c[b][a]=g[b][a]}}c.toString=this.path2string;return c},pathToAbsolute:function(c){if(!this.is(c,"array")||!this.is(c&&c[0],"array")){c=this.parsePathString(c)}var k=[],m=0,l=0,o=0,n=0,g=0,h=c.length,b,d,e,a;if(h&&c[0][0]=="M"){m=+c[0][1];l=+c[0][2];o=m;n=l;g++;k[0]=["M",m,l]}for(;g<h;g++){b=k[g]=[];d=c[g];if(d[0]!=d[0].toUpperCase()){b[0]=d[0].toUpperCase();switch(b[0]){case"A":b[1]=d[1];b[2]=d[2];b[3]=d[3];b[4]=d[4];b[5]=d[5];b[6]=+(d[6]+m);b[7]=+(d[7]+l);break;case"V":b[1]=+d[1]+l;break;case"H":b[1]=+d[1]+m;break;case"M":o=+d[1]+m;n=+d[2]+l;default:e=1;a=d.length;for(;e<a;e++){b[e]=+d[e]+((e%2)?m:l)}}}else{e=0;a=d.length;for(;e<a;e++){k[g][e]=d[e]}}switch(b[0]){case"Z":m=o;l=n;break;case"H":m=b[1];break;case"V":l=b[1];break;case"M":d=k[g];a=d.length;o=d[a-2];n=d[a-1];default:d=k[g];a=d.length;m=d[a-2];l=d[a-1]}}k.toString=this.path2string;return k},pathToRelative:function(d){if(!this.is(d,"array")||!this.is(d&&d[0],"array")){d=this.parsePathString(d)}var n=[],p=0,o=0,t=0,s=0,c=0,a,q,h,g,e,m,u,l,b;if(d[0][0]=="M"){p=d[0][1];o=d[0][2];t=p;s=o;c++;n.push(["M",p,o])}for(h=c,u=d.length;h<u;h++){a=n[h]=[];q=d[h];if(q[0]!=q[0].toLowerCase()){a[0]=q[0].toLowerCase();switch(a[0]){case"a":a[1]=q[1];a[2]=q[2];a[3]=q[3];a[4]=q[4];a[5]=q[5];a[6]=+(q[6]-p).toFixed(3);a[7]=+(q[7]-o).toFixed(3);break;case"v":a[1]=+(q[1]-o).toFixed(3);break;case"m":t=q[1];s=q[2];default:for(g=1,l=q.length;g<l;g++){a[g]=+(q[g]-((g%2)?p:o)).toFixed(3)}}}else{a=n[h]=[];if(q[0]=="m"){t=q[1]+p;s=q[2]+o}for(e=0,b=q.length;e<b;e++){n[h][e]=q[e]}}m=n[h].length;switch(n[h][0]){case"z":p=t;o=s;break;case"h":p+=+n[h][m-1];break;case"v":o+=+n[h][m-1];break;default:p+=+n[h][m-2];o+=+n[h][m-1]}}n.toString=this.path2string;return n},path2curve:function(k){var d=this,h=d.pathToAbsolute(k),c=h.length,j={x:0,y:0,bx:0,by:0,X:0,Y:0,qx:null,qy:null},b,a,g,e;for(b=0;b<c;b++){h[b]=d.command2curve(h[b],j);if(h[b].length>7){h[b].shift();e=h[b];while(e.length){Ext.Array.splice(h,b++,0,["C"].concat(Ext.Array.splice(e,0,6)))}Ext.Array.erase(h,b,1);c=h.length;b--}a=h[b];g=a.length;j.x=a[g-2];j.y=a[g-1];j.bx=parseFloat(a[g-4])||j.x;j.by=parseFloat(a[g-3])||j.y}return h},interpolatePaths:function(r,l){var j=this,d=j.pathToAbsolute(r),m=j.pathToAbsolute(l),n={x:0,y:0,bx:0,by:0,X:0,Y:0,qx:null,qy:null},a={x:0,y:0,bx:0,by:0,X:0,Y:0,qx:null,qy:null},b=function(p,s){if(p[s].length>7){p[s].shift();var t=p[s];while(t.length){Ext.Array.splice(p,s++,0,["C"].concat(Ext.Array.splice(t,0,6)))}Ext.Array.erase(p,s,1);o=Math.max(d.length,m.length||0)}},c=function(v,u,s,p,t){if(v&&u&&v[t][0]=="M"&&u[t][0]!="M"){Ext.Array.splice(u,t,0,["M",p.x,p.y]);s.bx=0;s.by=0;s.x=v[t][1];s.y=v[t][2];o=Math.max(d.length,m.length||0)}},h,o,g,q,e,k;for(h=0,o=Math.max(d.length,m.length||0);h<o;h++){d[h]=j.command2curve(d[h],n);b(d,h);(m[h]=j.command2curve(m[h],a));b(m,h);c(d,m,n,a,h);c(m,d,a,n,h);g=d[h];q=m[h];e=g.length;k=q.length;n.x=g[e-2];n.y=g[e-1];n.bx=parseFloat(g[e-4])||n.x;n.by=parseFloat(g[e-3])||n.y;a.bx=(parseFloat(q[k-4])||a.x);a.by=(parseFloat(q[k-3])||a.y);a.x=q[k-2];a.y=q[k-1]}return[d,m]},command2curve:function(c,b){var a=this;if(!c){return["C",b.x,b.y,b.x,b.y,b.x,b.y]}if(c[0]!="T"&&c[0]!="Q"){b.qx=b.qy=null}switch(c[0]){case"M":b.X=c[1];b.Y=c[2];break;case"A":c=["C"].concat(a.arc2curve.apply(a,[b.x,b.y].concat(c.slice(1))));break;case"S":c=["C",b.x+(b.x-(b.bx||b.x)),b.y+(b.y-(b.by||b.y))].concat(c.slice(1));break;case"T":b.qx=b.x+(b.x-(b.qx||b.x));b.qy=b.y+(b.y-(b.qy||b.y));c=["C"].concat(a.quadratic2curve(b.x,b.y,b.qx,b.qy,c[1],c[2]));break;case"Q":b.qx=c[1];b.qy=c[2];c=["C"].concat(a.quadratic2curve(b.x,b.y,c[1],c[2],c[3],c[4]));break;case"L":c=["C"].concat(b.x,b.y,c[1],c[2],c[1],c[2]);break;case"H":c=["C"].concat(b.x,b.y,c[1],b.y,c[1],b.y);break;case"V":c=["C"].concat(b.x,b.y,b.x,c[1],b.x,c[1]);break;case"Z":c=["C"].concat(b.x,b.y,b.X,b.Y,b.X,b.Y);break}return c},quadratic2curve:function(b,d,h,e,a,c){var g=1/3,i=2/3;return[g*b+i*h,g*d+i*e,g*a+i*h,g*c+i*e,a,c]},rotate:function(b,h,a){var d=Math.cos(a),c=Math.sin(a),g=b*d-h*c,e=b*c+h*d;return{x:g,y:e}},arc2curve:function(s,af,H,F,z,n,g,r,ae,A){var v=this,d=Math.PI,w=v.radian,E=d*120/180,b=w*(+z||0),M=[],J=Math,T=J.cos,a=J.sin,V=J.sqrt,u=J.abs,o=J.asin,I,O,N,aa,c,R,U,C,B,m,l,q,j,ad,e,ac,P,S,Q,ab,Z,Y,W,L,X,K,D,G,p;if(!A){I=v.rotate(s,af,-b);s=I.x;af=I.y;I=v.rotate(r,ae,-b);r=I.x;ae=I.y;O=(s-r)/2;N=(af-ae)/2;aa=(O*O)/(H*H)+(N*N)/(F*F);if(aa>1){aa=V(aa);H=aa*H;F=aa*F}c=H*H;R=F*F;U=(n==g?-1:1)*V(u((c*R-c*N*N-R*O*O)/(c*N*N+R*O*O)));C=U*H*N/F+(s+r)/2;B=U*-F*O/H+(af+ae)/2;m=o(((af-B)/F).toFixed(7));l=o(((ae-B)/F).toFixed(7));m=s<C?d-m:m;l=r<C?d-l:l;if(m<0){m=d*2+m}if(l<0){l=d*2+l}if(g&&m>l){m=m-d*2}if(!g&&l>m){l=l-d*2}}else{m=A[0];l=A[1];C=A[2];B=A[3]}q=l-m;if(u(q)>E){D=l;G=r;p=ae;l=m+E*(g&&l>m?1:-1);r=C+H*T(l);ae=B+F*a(l);M=v.arc2curve(r,ae,H,F,z,0,g,G,p,[l,D,C,B])}q=l-m;j=T(m);ad=a(m);e=T(l);ac=a(l);P=J.tan(q/4);S=4/3*H*P;Q=4/3*F*P;ab=[s,af];Z=[s+S*ad,af-Q*j];Y=[r+S*ac,ae-Q*e];W=[r,ae];Z[0]=2*ab[0]-Z[0];Z[1]=2*ab[1]-Z[1];if(A){return[Z,Y,W].concat(M)}else{M=[Z,Y,W].concat(M).join().split(",");L=[];K=M.length;for(X=0;X<K;X++){L[X]=X%2?v.rotate(M[X-1],M[X],b).y:v.rotate(M[X],M[X+1],b).x}return L}},rotateAndTranslatePath:function(k){var c=k.rotation.degrees,d=k.rotation.x,b=k.rotation.y,o=k.translation.x,l=k.translation.y,n,g,a,m,e,h=[];if(!c&&!o&&!l){return this.pathToAbsolute(k.attr.path)}o=o||0;l=l||0;n=this.pathToAbsolute(k.attr.path);for(g=n.length;g--;){a=h[g]=n[g].slice();if(a[0]=="A"){m=this.rotatePoint(a[6],a[7],c,d,b);a[6]=m.x+o;a[7]=m.y+l}else{e=1;while(a[e+1]!=null){m=this.rotatePoint(a[e],a[e+1],c,d,b);a[e]=m.x+o;a[e+1]=m.y+l;e+=2}}}return h},rotatePoint:function(b,h,e,a,g){if(!e){return{x:b,y:h}}a=a||0;g=g||0;b=b-a;h=h-g;e=e*this.radian;var d=Math.cos(e),c=Math.sin(e);return{x:b*d-h*c+a,y:b*c+h*d+g}},pathDimensions:function(o){if(!o||!(o+"")){return{x:0,y:0,width:0,height:0}}o=this.path2curve(o);var m=0,l=0,e=[],b=[],h=0,k=o.length,c,a,n,g,d,j;for(;h<k;h++){c=o[h];if(c[0]=="M"){m=c[1];l=c[2];e.push(m);b.push(l)}else{j=this.curveDim(m,l,c[1],c[2],c[3],c[4],c[5],c[6]);e=e.concat(j.min.x,j.max.x);b=b.concat(j.min.y,j.max.y);m=c[5];l=c[6]}}a=Math.min.apply(0,e);n=Math.min.apply(0,b);g=Math.max.apply(0,e);d=Math.max.apply(0,b);return{x:Math.round(a),y:Math.round(n),path:o,width:Math.round(g-a),height:Math.round(d-n)}},intersectInside:function(b,c,a){return(a[0]-c[0])*(b[1]-c[1])>(a[1]-c[1])*(b[0]-c[0])},intersectIntersection:function(n,m,g,d){var c=[],b=g[0]-d[0],a=g[1]-d[1],k=n[0]-m[0],i=n[1]-m[1],l=g[0]*d[1]-g[1]*d[0],j=n[0]*m[1]-n[1]*m[0],h=1/(b*i-a*k);c[0]=(l*k-j*b)*h;c[1]=(l*i-j*a)*h;return c},intersect:function(o,c){var n=this,k=0,m=c.length,h=c[m-1],p=o,g,q,l,a,b,d;for(;k<m;++k){g=c[k];b=p;p=[];q=b[b.length-1];d=0;a=b.length;for(;d<a;d++){l=b[d];if(n.intersectInside(l,h,g)){if(!n.intersectInside(q,h,g)){p.push(n.intersectIntersection(q,l,h,g))}p.push(l)}else{if(n.intersectInside(q,h,g)){p.push(n.intersectIntersection(q,l,h,g))}}q=l}h=g}return p},bezier:function(h,g,m,l,e){if(e===0){return h}else{if(e===1){return l}}var j=1-e,i=j*j*j,k=e/j;return i*(h+k*(3*g+k*(3*m+l*k)))},bezierDim:function(t,q,n,m){var v=[],g,j,p,h,u,e,w,k,o,l;if(t+3*n==m+3*q){g=t-q;g/=2*(t-q-q+n);if(g<1&&g>0){v.push(g)}}else{j=t-3*q+3*n-m;p=2*(t-q-q+n);h=t-q;u=p*p-4*j*h;e=j+j;if(u===0){g=p/e;if(g<1&&g>0){v.push(g)}}else{if(u>0){w=Math.sqrt(u);g=(w+p)/e;if(g<1&&g>0){v.push(g)}g=(p-w)/e;if(g<1&&g>0){v.push(g)}}}}k=Math.min(t,m);o=Math.max(t,m);for(l=0;l<v.length;l++){k=Math.min(k,this.bezier(t,q,n,m,v[l]));o=Math.max(o,this.bezier(t,q,n,m,v[l]))}return[k,o]},curveDim:function(b,a,d,c,k,j,h,e){var i=this.bezierDim(b,d,k,h),g=this.bezierDim(a,c,j,e);return{min:{x:i[0],y:g[0]},max:{x:i[1],y:g[1]}}},getAnchors:function(e,d,k,j,v,u,q){q=q||4;var i=Math,p=i.PI,r=p/2,m=i.abs,a=i.sin,b=i.cos,g=i.atan,t,s,h,l,o,n,x,w,c;t=(k-e)/q;s=(v-k)/q;if((j>=d&&j>=u)||(j<=d&&j<=u)){h=l=r}else{h=g((k-e)/m(j-d));if(d<j){h=p-h}l=g((v-k)/m(j-u));if(u<j){l=p-l}}c=r-((h+l)%(p*2))/2;if(c>r){c-=p}h+=c;l+=c;o=k-t*a(h);n=j+t*b(h);x=k+s*a(l);w=j+s*b(l);if((j>d&&n<d)||(j<d&&n>d)){o+=m(d-n)*(o-k)/(n-j);n=d}if((j>u&&w<u)||(j<u&&w>u)){x-=m(u-w)*(x-k)/(w-j);w=u}return{x1:o,y1:n,x2:x,y2:w}},smooth:function(a,p){var o=this.path2curve(a),c=[o[0]],g=o[0][1],e=o[0][2],q,s,t=1,h=o.length,d=1,l=g,k=e,w,v,u,m,r,n,b;for(;t<h;t++){w=o[t];v=w.length;u=o[t-1];m=u.length;r=o[t+1];n=r&&r.length;if(w[0]=="M"){l=w[1];k=w[2];q=t+1;while(o[q][0]!="C"){q++}c.push(["M",l,k]);d=c.length;g=l;e=k;continue}if(w[v-2]==l&&w[v-1]==k&&(!r||r[0]=="M")){b=c[d].length;s=this.getAnchors(u[m-2],u[m-1],l,k,c[d][b-2],c[d][b-1],p);c[d][1]=s.x2;c[d][2]=s.y2}else{if(!r||r[0]=="M"){s={x1:w[v-2],y1:w[v-1]}}else{s=this.getAnchors(u[m-2],u[m-1],w[v-2],w[v-1],r[n-2],r[n-1],p)}}c.push(["C",g,e,s.x1,s.y1,w[v-2],w[v-1]]);g=s.x2;e=s.y2}return c},findDotAtSegment:function(b,a,d,c,j,i,h,g,k){var e=1-k;return{x:Math.pow(e,3)*b+Math.pow(e,2)*3*k*d+e*3*k*k*j+Math.pow(k,3)*h,y:Math.pow(e,3)*a+Math.pow(e,2)*3*k*c+e*3*k*k*i+Math.pow(k,3)*g}},snapEnds:function(o,c,k,u){if(Ext.isDate(o)){return this.snapEndsByDate(o,c,k)}var e=(c-o)/k,b=Math.floor(Math.log(e)/Math.LN10)+1,n=Math.pow(10,b),d,q,r=Math.round((e%n)*Math.pow(10,2-b)),s=[[0,15],[10,1],[20,4],[25,2],[50,9],[100,15]],a=0,l,j,p,h,t=1000000000,g=s.length;q=Math.floor(o/n)*n;if(o==q&&q>0){q=Math.floor((o-(n/10))/n)*n}if(u){for(p=0;p<g;p++){l=s[p][0];j=(l-r)<0?1000000:(l-r)/s[p][1];if(j<t){h=l;t=j}}e=Math.floor(e*Math.pow(10,-b))*Math.pow(10,b)+h*Math.pow(10,b-2);if(o<0&&c>=0){d=0;while(d>o){d-=e;a++}o=+d.toFixed(10);d=0;while(d<c){d+=e;a++}c=+d.toFixed(10)}else{d=o=q;while(d<c){d+=e;a++}}c=+d.toFixed(10)}else{o=q;a=k}return{from:o,to:c,power:b,step:e,steps:a}},snapEndsByDate:function(k,l,b,m){var e=false,h=[[Ext.Date.MILLI,[1,2,5,10,20,50,100,200,250,500]],[Ext.Date.SECOND,[1,2,5,10,15,30]],[Ext.Date.MINUTE,[1,2,5,10,15,30]],[Ext.Date.HOUR,[1,2,3,4,6,12]],[Ext.Date.DAY,[1,2,7,14]],[Ext.Date.MONTH,[1,2,3,6]]],g=h.length,i=false,c,d,a,n;for(n=0;n<g;n++){c=h[n];if(!i){for(d=0;d<c[1].length;d++){if(l<Ext.Date.add(k,c[0],c[1][d]*b)){e=[c[0],c[1][d]];i=true;break}}}}if(!e){a=this.snapEnds(k.getFullYear(),l.getFullYear()+1,b,m);e=[Date.YEAR,Math.round(a.step)]}return this.snapEndsByDateAndStep(k,l,e,m)},snapEndsByDateAndStep:function(l,m,a,o){var n=[l.getFullYear(),l.getMonth(),l.getDate(),l.getHours(),l.getMinutes(),l.getSeconds(),l.getMilliseconds()],k,c,p,b,i,e,j,d,h=a[0],g=a[1];if(o){c=l}else{switch(h){case Ext.Date.MILLI:c=new Date(n[0],n[1],n[2],n[3],n[4],n[5],Math.floor(n[6]/g)*g);break;case Ext.Date.SECOND:c=new Date(n[0],n[1],n[2],n[3],n[4],Math.floor(n[5]/g)*g,0);break;case Ext.Date.MINUTE:c=new Date(n[0],n[1],n[2],n[3],Math.floor(n[4]/g)*g,0,0);break;case Ext.Date.HOUR:c=new Date(n[0],n[1],n[2],Math.floor(n[3]/g)*g,0,0,0);break;case Ext.Date.DAY:c=new Date(n[0],n[1],Math.floor((n[2]-1)/g)*g+1,0,0,0,0);break;case Ext.Date.MONTH:c=new Date(n[0],Math.floor(n[1]/g)*g,1,0,0,0,0);break;default:c=new Date(Math.floor(n[0]/g)*g,0,1,0,0,0,0);break}}d=((h===Ext.Date.MONTH)&&(g==1/2||g==1/3||g==1/4));k=(d?[]:0);p=new Date(c);while(p<m){if(d){b=new Date(p);i=b.getFullYear();e=b.getMonth();j=b.getDate();switch(g){case 1/2:if(j>=15){j=1;if(++e>11){i++}}else{j=15}break;case 1/3:if(j>=20){j=1;if(++e>11){i++}}else{if(j>=10){j=20}else{j=10}}break;case 1/4:if(j>=22){j=1;if(++e>11){i++}}else{if(j>=15){j=22}else{if(j>=8){j=15}else{j=8}}}break}p.setYear(i);p.setMonth(e);p.setDate(j);k.push(new Date(p))}else{p=Ext.Date.add(p,h,g);k++}}if(o){p=m}if(d){return{from:+c,to:+p,steps:k}}else{return{from:+c,to:+p,step:(p-c)/k,steps:k}}},sorter:function(d,c){return d.offset-c.offset},rad:function(a){return a%360*Math.PI/180},degrees:function(a){return a*180/Math.PI%360},withinBox:function(a,c,b){b=b||{};return(a>=b.x&&a<=(b.x+b.width)&&c>=b.y&&c<=(b.y+b.height))},parseGradient:function(k){var e=this,g=k.type||"linear",c=k.angle||0,i=e.radian,l=k.stops,a=[],j,b,h,d;if(g=="linear"){b=[0,0,Math.cos(c*i),Math.sin(c*i)];h=1/(Math.max(Math.abs(b[2]),Math.abs(b[3]))||1);b[2]*=h;b[3]*=h;if(b[2]<0){b[0]=-b[2];b[2]=0}if(b[3]<0){b[1]=-b[3];b[3]=0}}for(j in l){if(l.hasOwnProperty(j)&&e.stopsRE.test(j)){d={offset:parseInt(j,10),color:Ext.draw.Color.toHex(l[j].color)||"#ffffff",opacity:l[j].opacity||1};a.push(d)}}Ext.Array.sort(a,e.sorter);if(g=="linear"){return{id:k.id,type:g,vector:b,stops:a}}else{return{id:k.id,type:g,centerX:k.centerX,centerY:k.centerY,focalX:k.focalX,focalY:k.focalY,radius:k.radius,vector:b,stops:a}}}});Ext.define("Ext.fx.PropertyHandler",{statics:{defaultHandler:{pixelDefaultsRE:/width|height|top$|bottom$|left$|right$/i,unitRE:/^(-?\d*\.?\d*){1}(em|ex|px|in|cm|mm|pt|pc|%)*$/,scrollRE:/^scroll/i,computeDelta:function(j,c,a,g,i){a=(typeof a=="number")?a:1;var h=this.unitRE,d=h.exec(j),b,e;if(d){j=d[1];e=d[2];if(!this.scrollRE.test(i)&&!e&&this.pixelDefaultsRE.test(i)){e="px"}}j=+j||0;d=h.exec(c);if(d){c=d[1];e=d[2]||e}c=+c||0;b=(g!=null)?g:j;return{from:j,delta:(c-b)*a,units:e}},get:function(o,b,a,n,k){var m=o.length,d=[],e,h,l,c,g;for(e=0;e<m;e++){if(n){h=n[e][1].from}if(Ext.isArray(o[e][1])&&Ext.isArray(b)){l=[];c=0;g=o[e][1].length;for(;c<g;c++){l.push(this.computeDelta(o[e][1][c],b[c],a,h,k))}d.push([o[e][0],l])}else{d.push([o[e][0],this.computeDelta(o[e][1],b,a,h,k)])}}return d},set:function(l,g){var h=l.length,c=[],d,a,k,e,b;for(d=0;d<h;d++){a=l[d][1];if(Ext.isArray(a)){k=[];b=0;e=a.length;for(;b<e;b++){k.push(a[b].from+a[b].delta*g+(a[b].units||0))}c.push([l[d][0],k])}else{c.push([l[d][0],a.from+a.delta*g+(a.units||0)])}}return c}},stringHandler:{computeDelta:function(e,b,d,c,a){return{from:e,delta:b}},get:function(o,b,a,n,k){var m=o.length,d=[],e,h,l,c,g;for(e=0;e<m;e++){d.push([o[e][0],this.computeDelta(o[e][1],b,a,h,k)])}return d},set:function(l,g){var h=l.length,c=[],d,a,k,e,b;for(d=0;d<h;d++){a=l[d][1];c.push([l[d][0],a.delta])}return c}},color:{rgbRE:/^rgb\(([0-9]+)\s*,\s*([0-9]+)\s*,\s*([0-9]+)\)$/i,hexRE:/^#?([0-9A-F]{2})([0-9A-F]{2})([0-9A-F]{2})$/i,hex3RE:/^#?([0-9A-F]{1})([0-9A-F]{1})([0-9A-F]{1})$/i,parseColor:function(e,a){a=(typeof a=="number")?a:1;var g=false,c=[this.hexRE,this.rgbRE,this.hex3RE],d=c.length,j,b,k,h;for(h=0;h<d;h++){k=c[h];b=(h%2===0)?16:10;j=k.exec(e);if(j&&j.length===4){if(h===2){j[1]+=j[1];j[2]+=j[2];j[3]+=j[3]}g={red:parseInt(j[1],b),green:parseInt(j[2],b),blue:parseInt(j[3],b)};break}}return g||e},computeDelta:function(h,a,e,c){h=this.parseColor(h);a=this.parseColor(a,e);var g=c?c:h,b=typeof g,d=typeof a;if(b=="string"||b=="undefined"||d=="string"||d=="undefined"){return a||g}return{from:h,delta:{red:Math.round((a.red-g.red)*e),green:Math.round((a.green-g.green)*e),blue:Math.round((a.blue-g.blue)*e)}}},get:function(j,a,g,d){var h=j.length,c=[],e,b;for(e=0;e<h;e++){if(d){b=d[e][1].from}c.push([j[e][0],this.computeDelta(j[e][1],a,g,b)])}return c},set:function(k,e){var g=k.length,c=[],d,b,a,h,j;for(d=0;d<g;d++){b=k[d][1];if(b){h=b.from;j=b.delta;b=(typeof b=="object"&&"red" in b)?"rgb("+b.red+", "+b.green+", "+b.blue+")":b;b=(typeof b=="object"&&b.length)?b[0]:b;if(typeof b=="undefined"){return[]}a=typeof b=="string"?b:"rgb("+[(h.red+Math.round(j.red*e))%256,(h.green+Math.round(j.green*e))%256,(h.blue+Math.round(j.blue*e))%256].join(",")+")";c.push([k[d][0],a])}}return c}},object:{interpolate:function(d,b){b=(typeof b=="number")?b:1;var a={},c;for(c in d){a[c]=parseFloat(d[c])*b}return a},computeDelta:function(h,a,c,b){h=this.interpolate(h);a=this.interpolate(a,c);var g=b?b:h,e={},d;for(d in a){e[d]=a[d]-g[d]}return{from:h,delta:e}},get:function(j,a,g,d){var h=j.length,c=[],e,b;for(e=0;e<h;e++){if(d){b=d[e][1].from}c.push([j[e][0],this.computeDelta(j[e][1],a,g,b)])}return c},set:function(l,g){var h=l.length,c=[],e={},d,j,k,b,a;for(d=0;d<h;d++){b=l[d][1];j=b.from;k=b.delta;for(a in j){e[a]=j[a]+k[a]*g}c.push([l[d][0],e])}return c}},path:{computeDelta:function(e,a,c,b){c=(typeof c=="number")?c:1;var d;e=+e||0;a=+a||0;d=(b!=null)?b:e;return{from:e,delta:(a-d)*c}},forcePath:function(a){if(!Ext.isArray(a)&&!Ext.isArray(a[0])){a=Ext.draw.Draw.parsePathString(a)}return a},get:function(b,l,a,q){var c=this.forcePath(l),n=[],s=b.length,d,h,o,g,p,m,e,t,r;for(o=0;o<s;o++){r=this.forcePath(b[o][1]);g=Ext.draw.Draw.interpolatePaths(r,c);r=g[0];c=g[1];d=r.length;t=[];for(m=0;m<d;m++){g=[r[m][0]];h=r[m].length;for(e=1;e<h;e++){p=q&&q[0][1][m][e].from;g.push(this.computeDelta(r[m][e],c[m][e],a,p))}t.push(g)}n.push([b[o][0],t])}return n},set:function(p,n){var o=p.length,e=[],h,g,d,l,m,c,a,b;for(h=0;h<o;h++){c=p[h][1];l=[];a=c.length;for(g=0;g<a;g++){m=[c[g][0]];b=c[g].length;for(d=1;d<b;d++){m.push(c[g][d].from+c[g][d].delta*n)}l.push(m.join(","))}e.push([p[h][0],l.join(",")])}return e}}}},function(){var b=["outlineColor","backgroundColor","borderColor","borderTopColor","borderRightColor","borderBottomColor","borderLeftColor","fill","stroke"],c=b.length,a=0,d;for(;a<c;a++){d=b[a];this[d]=this.color}b=["cursor"];c=b.length;a=0;for(;a<c;a++){d=b[a];this[d]=this.stringHandler}});Ext.define("Ext.fx.Anim",{mixins:{observable:Ext.util.Observable},isAnimation:true,duration:250,delay:0,delayStart:0,dynamic:false,easing:"ease",damper:1,bezierRE:/^(?:cubic-)?bezier\(([^,]+),([^,]+),([^,]+),([^\)]+)\)/,reverse:false,running:false,paused:false,iterations:1,alternate:false,currentIteration:0,startTime:0,frameCount:0,constructor:function(a){var b=this,c;a=a||{};if(a.keyframes){return new Ext.fx.Animator(a)}Ext.apply(b,a);if(b.from===undefined){b.from={}}b.propHandlers={};b.config=a;b.target=Ext.fx.Manager.createTarget(b.target);b.easingFn=Ext.fx.Easing[b.easing];b.target.dynamic=b.dynamic;if(!b.easingFn){b.easingFn=String(b.easing).match(b.bezierRE);if(b.easingFn&&b.easingFn.length==5){c=b.easingFn;b.easingFn=Ext.fx.CubicBezier.cubicBezier(+c[1],+c[2],+c[3],+c[4])}}b.id=Ext.id(null,"ext-anim-");b.addEvents("beforeanimate","afteranimate","lastframe");b.mixins.observable.constructor.call(b);Ext.fx.Manager.addAnim(b)},setAttr:function(a,b){return Ext.fx.Manager.items.get(this.id).setAttr(this.target,a,b)},initAttrs:function(){var e=this,h=e.from,i=e.to,g=e.initialFrom||{},c={},a,b,j,d;for(d in i){if(i.hasOwnProperty(d)){a=e.target.getAttr(d,h[d]);b=i[d];if(!Ext.fx.PropertyHandler[d]){if(Ext.isObject(b)){j=e.propHandlers[d]=Ext.fx.PropertyHandler.object}else{j=e.propHandlers[d]=Ext.fx.PropertyHandler.defaultHandler}}else{j=e.propHandlers[d]=Ext.fx.PropertyHandler[d]}c[d]=j.get(a,b,e.damper,g[d],d)}}e.currentAttrs=c},start:function(d){var e=this,c=e.delay,b=e.delayStart,a;if(c){if(!b){e.delayStart=d;return}else{a=d-b;if(a<c){return}else{d=new Date(b.getTime()+c)}}}if(e.fireEvent("beforeanimate",e)!==false){e.startTime=d;if(!e.paused&&!e.currentAttrs){e.initAttrs()}e.running=true;e.frameCount=0}},runAnim:function(l){var i=this,k=i.currentAttrs,d=i.duration,c=i.easingFn,b=i.propHandlers,g={},h,j,e,a;if(l>=d){l=d;a=true}if(i.reverse){l=d-l}for(e in k){if(k.hasOwnProperty(e)){j=k[e];h=a?1:c(l/d);g[e]=b[e].set(j,h)}}i.frameCount++;return g},lastFrame:function(){var c=this,a=c.iterations,b=c.currentIteration;b++;if(b<a){if(c.alternate){c.reverse=!c.reverse}c.startTime=new Date();c.currentIteration=b;c.paused=false}else{c.currentIteration=0;c.end();c.fireEvent("lastframe",c,c.startTime)}},endWasCalled:0,end:function(){if(this.endWasCalled++){return}var a=this;a.startTime=0;a.paused=false;a.running=false;Ext.fx.Manager.removeAnim(a);a.fireEvent("afteranimate",a,a.startTime);Ext.callback(a.callback,a.scope,[a,a.startTime])},isReady:function(){return this.paused===false&&this.running===false&&this.iterations>0},isRunning:function(){return this.paused===false&&this.running===true&&this.isAnimator!==true}});Ext.enableFx=true;Ext.define("Ext.util.Animate",{isAnimate:true,animate:function(a){var b=this;if(Ext.fx.Manager.hasFxBlock(b.id)){return b}Ext.fx.Manager.queueFx(new Ext.fx.Anim(b.anim(a)));return this},anim:function(a){if(!Ext.isObject(a)){return(a)?{}:false}var b=this;if(a.stopAnimation){b.stopAnimation()}Ext.applyIf(a,Ext.fx.Manager.getFxDefaults(b.id));return Ext.apply({target:b,paused:true},a)},stopFx:Ext.Function.alias(Ext.util.Animate,"stopAnimation"),stopAnimation:function(){Ext.fx.Manager.stopAnimation(this.id);return this},syncFx:function(){Ext.fx.Manager.setFxDefaults(this.id,{concurrent:true});return this},sequenceFx:function(){Ext.fx.Manager.setFxDefaults(this.id,{concurrent:false});return this},hasActiveFx:Ext.Function.alias(Ext.util.Animate,"getActiveAnimation"),getActiveAnimation:function(){return Ext.fx.Manager.getActiveAnimation(this.id)}},function(){Ext.applyIf(Ext.Element.prototype,this.prototype);Ext.CompositeElementLite.importElementMethods()});Ext.define("Ext.util.ElementContainer",{childEls:[],constructor:function(){var b=this,a;if(b.hasOwnProperty("childEls")){a=b.childEls;delete b.childEls;b.addChildEls.apply(b,a)}},destroy:function(){var e=this,d=e.getChildEls(),g,a,c,b;for(c=d.length;c--;){a=d[c];if(typeof a!="string"){a=a.name}g=e[a];if(g){e[a]=null;g.remove()}}},addChildEls:function(){var b=this,a=arguments;if(b.hasOwnProperty("childEls")){b.childEls.push.apply(b.childEls,a)}else{b.childEls=b.getChildEls().concat(Array.prototype.slice.call(a))}b.prune(b.childEls,false)},applyChildEls:function(b,a){var e=this,g=e.getChildEls(),j,k,d,c,h;j=(a||e.id)+"-";for(d=g.length;d--;){k=g[d];if(typeof k=="string"){h=b.getById(j+k)}else{if((c=k.select)){h=Ext.select(c,true,b.dom)}else{if((c=k.selectNode)){h=Ext.get(Ext.DomQuery.selectNode(c,b.dom))}else{h=b.getById(k.id||(j+k.itemId))}}k=k.name}e[k]=h}},getChildEls:function(){var b=this,a;if(b.hasOwnProperty("childEls")){return b.childEls}a=b.self;return a.$childEls||b.getClassChildEls(a)},getClassChildEls:function(o){var k=this,p=o.$childEls,m,d,b,j,n,h,a,c,e,g,l;if(!p){g=o.superclass;if(g){g=g.self;c=[g.$childEls||k.getClassChildEls(g)];l=g.prototype.mixins||{}}else{c=[];l={}}e=o.prototype;h=e.mixins;for(a in h){if(h.hasOwnProperty(a)&&!l.hasOwnProperty(a)){n=h[a].self;c.push(n.$childEls||k.getClassChildEls(n))}}c.push(e.hasOwnProperty("childEls")&&e.childEls);for(d=0,b=c.length;d<b;++d){m=c[d];if(m&&m.length){if(!p){p=m}else{if(!j){j=true;p=p.slice(0)}p.push.apply(p,m)}}}o.$childEls=p=(p?k.prune(p,!j):[])}return p},prune:function(c,e){var b=c.length,d={},a;while(b--){a=c[b];if(typeof a!="string"){a=a.name}if(!d[a]){d[a]=1}else{if(e){e=false;c=c.slice(0)}Ext.Array.erase(c,b,1)}}return c},removeChildEls:function(g){var e=this,a=e.getChildEls(),d=(e.childEls=[]),h,b,c;for(b=0,h=a.length;b<h;++b){c=a[b];if(!g(c)){d.push(c)}}}});Ext.define("Ext.util.Renderable",{frameCls:Ext.baseCSSPrefix+"frame",frameIdRegex:/[\-]frame\d+[TMB][LCR]$/,frameElNames:["TL","TC","TR","ML","MC","MR","BL","BC","BR"],frameTpl:["{%this.renderDockedItems(out,values,0);%}",'<tpl if="top">','<tpl if="left"><div id="{fgid}TL" class="{frameCls}-tl {baseCls}-tl {baseCls}-{ui}-tl<tpl for="uiCls"> {parent.baseCls}-{parent.ui}-{.}-tl</tpl>{frameElCls}" role="presentation"></tpl>','<tpl if="right"><div id="{fgid}TR" class="{frameCls}-tr {baseCls}-tr {baseCls}-{ui}-tr<tpl for="uiCls"> {parent.baseCls}-{parent.ui}-{.}-tr</tpl>{frameElCls}" role="presentation"></tpl>','<div id="{fgid}TC" class="{frameCls}-tc {baseCls}-tc {baseCls}-{ui}-tc<tpl for="uiCls"> {parent.baseCls}-{parent.ui}-{.}-tc</tpl>{frameElCls}" role="presentation"></div>','<tpl if="right"></div></tpl>','<tpl if="left"></div></tpl>',"</tpl>",'<tpl if="left"><div id="{fgid}ML" class="{frameCls}-ml {baseCls}-ml {baseCls}-{ui}-ml<tpl for="uiCls"> {parent.baseCls}-{parent.ui}-{.}-ml</tpl>{frameElCls}" role="presentation"></tpl>','<tpl if="right"><div id="{fgid}MR" class="{frameCls}-mr {baseCls}-mr {baseCls}-{ui}-mr<tpl for="uiCls"> {parent.baseCls}-{parent.ui}-{.}-mr</tpl>{frameElCls}" role="presentation"></tpl>','<div id="{fgid}MC" class="{frameCls}-mc {baseCls}-mc {baseCls}-{ui}-mc<tpl for="uiCls"> {parent.baseCls}-{parent.ui}-{.}-mc</tpl>{frameElCls}" role="presentation">',"{%this.applyRenderTpl(out, values)%}","</div>",'<tpl if="right"></div></tpl>','<tpl if="left"></div></tpl>','<tpl if="bottom">','<tpl if="left"><div id="{fgid}BL" class="{frameCls}-bl {baseCls}-bl {baseCls}-{ui}-bl<tpl for="uiCls"> {parent.baseCls}-{parent.ui}-{.}-bl</tpl>{frameElCls}" role="presentation"></tpl>','<tpl if="right"><div id="{fgid}BR" class="{frameCls}-br {baseCls}-br {baseCls}-{ui}-br<tpl for="uiCls"> {parent.baseCls}-{parent.ui}-{.}-br</tpl>{frameElCls}" role="presentation"></tpl>','<div id="{fgid}BC" class="{frameCls}-bc {baseCls}-bc {baseCls}-{ui}-bc<tpl for="uiCls"> {parent.baseCls}-{parent.ui}-{.}-bc</tpl>{frameElCls}" role="presentation"></div>','<tpl if="right"></div></tpl>','<tpl if="left"></div></tpl>',"</tpl>","{%this.renderDockedItems(out,values,1);%}"],frameTableTpl:["{%this.renderDockedItems(out,values,0);%}",'<table class="',Ext.baseCSSPrefix,"table-plain",'" cellpadding="0"><tbody>','<tpl if="top">',"<tr>",'<tpl if="left"><td id="{fgid}TL" class="{frameCls}-tl {baseCls}-tl {baseCls}-{ui}-tl<tpl for="uiCls"> {parent.baseCls}-{parent.ui}-{.}-tl</tpl>{frameElCls}" role="presentation"></td></tpl>','<td id="{fgid}TC" class="{frameCls}-tc {baseCls}-tc {baseCls}-{ui}-tc<tpl for="uiCls"> {parent.baseCls}-{parent.ui}-{.}-tc</tpl>{frameElCls}" role="presentation"></td>','<tpl if="right"><td id="{fgid}TR" class="{frameCls}-tr {baseCls}-tr {baseCls}-{ui}-tr<tpl for="uiCls"> {parent.baseCls}-{parent.ui}-{.}-tr</tpl>{frameElCls}" role="presentation"></td></tpl>',"</tr>","</tpl>","<tr>",'<tpl if="left"><td id="{fgid}ML" class="{frameCls}-ml {baseCls}-ml {baseCls}-{ui}-ml<tpl for="uiCls"> {parent.baseCls}-{parent.ui}-{.}-ml</tpl>{frameElCls}" role="presentation"></td></tpl>','<td id="{fgid}MC" class="{frameCls}-mc {baseCls}-mc {baseCls}-{ui}-mc<tpl for="uiCls"> {parent.baseCls}-{parent.ui}-{.}-mc</tpl>{frameElCls}" role="presentation">',"{%this.applyRenderTpl(out, values)%}","</td>",'<tpl if="right"><td id="{fgid}MR" class="{frameCls}-mr {baseCls}-mr {baseCls}-{ui}-mr<tpl for="uiCls"> {parent.baseCls}-{parent.ui}-{.}-mr</tpl>{frameElCls}" role="presentation"></td></tpl>',"</tr>",'<tpl if="bottom">',"<tr>",'<tpl if="left"><td id="{fgid}BL" class="{frameCls}-bl {baseCls}-bl {baseCls}-{ui}-bl<tpl for="uiCls"> {parent.baseCls}-{parent.ui}-{.}-bl</tpl>{frameElCls}" role="presentation"></td></tpl>','<td id="{fgid}BC" class="{frameCls}-bc {baseCls}-bc {baseCls}-{ui}-bc<tpl for="uiCls"> {parent.baseCls}-{parent.ui}-{.}-bc</tpl>{frameElCls}" role="presentation"></td>','<tpl if="right"><td id="{fgid}BR" class="{frameCls}-br {baseCls}-br {baseCls}-{ui}-br<tpl for="uiCls"> {parent.baseCls}-{parent.ui}-{.}-br</tpl>{frameElCls}" role="presentation"></td></tpl>',"</tr>","</tpl>","</tbody></table>","{%this.renderDockedItems(out,values,1);%}"],afterRender:function(){var d=this,e={},i=d.protoEl,h=d.el,c,g,a,b;d.finishRenderChildren();if(d.contentEl){g=Ext.baseCSSPrefix;a=g+"hide-";b=Ext.get(d.contentEl);b.removeCls([g+"hidden",a+"display",a+"offsets",a+"nosize"]);d.getContentTarget().appendChild(b.dom)}i.writeTo(e);c=e.removed;if(c){h.removeCls(c)}c=e.cls;if(c.length){h.addCls(c)}c=e.style;if(e.style){h.setStyle(c)}d.protoEl=null;if(!d.ownerCt){d.updateLayout()}},afterFirstLayout:function(b,i){var d=this,h=d.x,e=d.y,c,a,g,j;if(!d.ownerLayout){c=Ext.isDefined(h);a=Ext.isDefined(e)}if(d.floating&&(!c||!a)){if(d.floatParent){g=d.floatParent.getTargetEl().getViewRegion();j=d.el.getAlignToXY(d.floatParent.getTargetEl(),"c-c");g.x=j[0]-g.x;g.y=j[1]-g.y}else{j=d.el.getAlignToXY(d.container,"c-c");g=d.container.translateXY(j[0],j[1])}h=c?h:g.x;e=a?e:g.y;c=a=true}if(c||a){d.setPosition(h,e)}d.onBoxReady(b,i)},applyRenderSelectors:function(){var d=this,b=d.renderSelectors,c=d.el,e=c.dom,a;d.applyChildEls(c);if(b){for(a in b){if(b.hasOwnProperty(a)&&b[a]){d[a]=Ext.get(Ext.DomQuery.selectNode(b[a],e))}}}},beforeRender:function(){var c=this,e=c.getTargetEl(),d=c.getOverflowEl(),b=c.getComponentLayout(),a=c.getOverflowStyle();c.frame=c.frame||c.alwaysFramed;if(!b.initialized){b.initLayout()}if(d){d.setStyle(a);c.overflowStyleSet=true}c.setUI(c.ui);if(c.disabled){c.disable(true)}},doApplyRenderTpl:function(c,a){var d=a.$comp,b;if(!d.rendered){b=d.initRenderTpl();b.applyOut(a.renderData,c)}},doAutoRender:function(){var a=this;if(!a.rendered){if(a.floating){a.render(document.body)}else{a.render(Ext.isBoolean(a.autoRender)?Ext.getBody():a.autoRender)}}},doRenderContent:function(a,c){var b=c.$comp;if(b.html){Ext.DomHelper.generateMarkup(b.html,a);delete b.html}if(b.tpl){if(!b.tpl.isTemplate){b.tpl=new Ext.XTemplate(b.tpl)}if(b.data){b.tpl.applyOut(b.data,a);delete b.data}}},doRenderFramingDockedItems:function(a,c,d){var b=c.$comp;if(!b.rendered&&b.doRenderDockedItems){c.renderData.$skipDockedItems=true;b.doRenderDockedItems.call(this,a,c,d)}},finishRender:function(a){var d=this,b,e,c;if(!d.el||d.$pid){if(d.container){c=d.container.getById(d.id,true)}else{c=Ext.getDom(d.id)}if(!d.el){d.wrapPrimaryEl(c)}else{delete d.$pid;if(!d.el.dom){d.wrapPrimaryEl(d.el)}c.parentNode.insertBefore(d.el.dom,c);Ext.removeNode(c)}}else{if(!d.rendering){b=d.initRenderTpl();if(b){e=d.initRenderData();b.insertFirst(d.getTargetEl(),e)}}}if(!d.container){d.container=Ext.get(d.el.dom.parentNode)}if(d.ctCls){d.container.addCls(d.ctCls)}d.onRender(d.container,a);if(!d.overflowStyleSet){d.getOverflowEl().setStyle(d.getOverflowStyle())}d.el.setVisibilityMode(Ext.Element[d.hideMode.toUpperCase()]);if(d.overCls){d.el.hover(d.addOverCls,d.removeOverCls,d)}if(d.hasListeners.render){d.fireEvent("render",d)}d.afterRender();if(d.hasListeners.afterrender){d.fireEvent("afterrender",d)}d.initEvents();if(d.hidden){d.el.hide()}},finishRenderChildren:function(){var a=this.getComponentLayout();a.finishRender()},getElConfig:function(){var j=this,l=j.autoEl,g=j.getFrameInfo(),b={tag:"div",tpl:g?j.initFramingTpl(g.table):j.initRenderTpl()},a=j.protoEl,c,e,h,m,d,k;j.initStyles(a);if(g){a.setStyle("background-image","none")}a.writeTo(b);a.flush();if(Ext.isString(l)){b.tag=l}else{Ext.apply(b,l)}b.id=j.id;if(b.tpl){if(g){e=j.frameElNames;h=e.length;b.tplData=k=j.getFrameRenderData();k.renderData=j.initRenderData();d=k.fgid;for(c=0;c<h;c++){m=e[c];j.addChildEls({name:"frame"+m,id:d+m})}j.addChildEls({name:"frameBody",id:d+"MC"})}else{b.tplData=j.initRenderData()}}return b},initFramingTpl:function(b){var a=this.getFrameTpl(b);if(a&&!a.applyRenderTpl){this.setupFramingTpl(a)}return a},setupFramingTpl:function(a){a.applyRenderTpl=this.doApplyRenderTpl;a.renderDockedItems=this.doRenderFramingDockedItems},getInsertPosition:function(a){if(a!==undefined){if(Ext.isNumber(a)){a=this.container.dom.childNodes[a]}else{a=Ext.getDom(a)}}return a},getRenderTree:function(){var a=this;if(!a.hasListeners.beforerender||a.fireEvent("beforerender",a)!==false){a.beforeRender();a.rendering=true;if(a.el){return{tag:"div",id:(a.$pid=Ext.id())}}return a.getElConfig()}return null},initContainer:function(a){var b=this;if(!a&&b.el){a=b.el.dom.parentNode;b.allowDomMove=false}b.container=a.dom?a:Ext.get(a);return b.container},initRenderData:function(){var a=this;return Ext.apply({$comp:a,id:a.id,ui:a.ui,uiCls:a.uiCls,baseCls:a.baseCls,componentCls:a.componentCls,frame:a.frame,childElCls:""},a.renderData)},initRenderTpl:function(){var a=this.getTpl("renderTpl");if(a&&!a.renderContent){this.setupRenderTpl(a)}return a},onRender:function(d,e){var h=this,j=h.x,i=h.y,c=null,a,k,b=h.el,g;h.applyRenderSelectors();h.rendering=null;h.rendered=true;if(j!=null){c={x:j}}if(i!=null){(c=c||{}).y=i}if(!h.getFrameInfo()&&Ext.isBorderBox){a=h.width;k=h.height;if(typeof a==="number"){c=c||{};c.width=a}if(typeof k==="number"){c=c||{};c.height=k}}h.lastBox=b.lastBox=c},render:function(c,b){var e=this,d=e.el&&(e.el=Ext.get(e.el)),h,a,g;Ext.suspendLayouts();c=e.initContainer(c);g=e.getInsertPosition(b);if(!d){a=e.getRenderTree();if(e.ownerLayout&&e.ownerLayout.transformItemRenderTree){a=e.ownerLayout.transformItemRenderTree(a)}if(a){if(g){d=Ext.DomHelper.insertBefore(g,a)}else{d=Ext.DomHelper.append(c,a)}e.wrapPrimaryEl(d)}}else{if(!e.hasListeners.beforerender||e.fireEvent("beforerender",e)!==false){e.beforeRender();e.initStyles(d);if(e.allowDomMove!==false){if(g){c.dom.insertBefore(d.dom,g)}else{c.dom.appendChild(d.dom)}}}else{h=true}}if(d&&!h){e.finishRender(b)}Ext.resumeLayouts(!c.isDetachedBody)},ensureAttachedToBody:function(c){var b=this,a;while(b.ownerCt){b=b.ownerCt}if(b.container.isDetachedBody){b.container=a=Ext.getBody();a.appendChild(b.el.dom);if(c){b.updateLayout()}if(typeof b.x=="number"||typeof b.y=="number"){b.setPosition(b.x,b.y)}}},setupRenderTpl:function(a){a.renderBody=a.renderContent=this.doRenderContent},wrapPrimaryEl:function(a){this.el=Ext.get(a,true)},initFrame:function(){if(Ext.supports.CSS3BorderRadius||!this.frame){return}var h=this,e=h.getFrameInfo(),a,c,d=h.frameElNames,g=d.length,b,j,k;if(e){a=h.getFrameTpl(e.table);j=h.getFrameRenderData();c=j.fgid;a.insertFirst(h.el,j);h.frameBody=h.el.down("."+h.frameCls+"-mc");h.removeChildEls(function(i){return i.id&&h.frameIdRegex.test(i.id)});for(b=0;b<g;b++){k=d[b];h["frame"+k]=h.el.getById(c+k)}}},getFrameRenderData:function(){var c=this,b=c.frameSize,a=(c.frameGenId||0)+1;c.frameGenId=a;return{$comp:c,fgid:c.id+"-frame"+a,ui:c.ui,uiCls:c.uiCls,frameCls:c.frameCls,baseCls:c.baseCls,top:!!b.top,left:!!b.left,right:!!b.right,bottom:!!b.bottom,frameElCls:""}},updateFrame:function(){if(Ext.supports.CSS3BorderRadius||!this.frame){return}var e=this,h=e.frameSize&&e.frameSize.table,g=e.frameTL,d=e.frameBL,c=e.frameML,a=e.frameMC,b;e.initFrame();if(a){if(e.frame){b=e.frameMC.dom.className;a.insertAfter(e.frameMC);e.frameMC.remove();e.frameBody=e.frameMC=a;a.dom.className=b;if(h){e.el.query("> table")[1].remove()}else{if(g){g.remove()}if(d){d.remove()}if(c){c.remove()}}}}else{if(e.frame){e.applyRenderSelectors()}}},getFrameInfo:function(){if(Ext.supports.CSS3BorderRadius||!this.frame){return false}var x=this,p=x.frameInfoCache,g=x.el||x.protoEl,e=g.dom?g.dom.className:g.classList.join(" "),y=p[e],q=Math.max,o,k,t,n,z,h,l,b,c,m,i,s,u,j,a,d,w,r,v;if(y==null){o=Ext.fly(x.getStyleProxy(e),"frame-style-el");t=o.getStyle("background-image");k=t.indexOf("about:blank#");if(k<0){y=false}else{t=t.substring(k+12).split("-");d=parseInt(t[1],10);w=parseInt(t[2],10);r=parseInt(t[3],10);v=parseInt(t[4],10);b=parseInt(t[5],10);c=parseInt(t[6],10);m=parseInt(t[7],10);i=parseInt(t[8],10);s=parseInt(t[9],10);u=parseInt(t[10],10);j=parseInt(t[11],10);a=parseInt(t[12],10);n=q(b,q(d,w));z=q(c,q(w,r));h=q(m,q(v,r));l=q(i,q(d,v));y={table:t[0].charAt(0)==="t",vertical:t[0].charAt(1)==="v",top:n,right:z,bottom:h,left:l,width:l+z,height:n+h,maxWidth:q(n,z,h,l),border:{top:b,right:c,bottom:m,left:i,width:i+c,height:b+m},padding:{top:s,right:u,bottom:j,left:a,width:a+u,height:s+j},radius:{tl:d,tr:w,br:r,bl:v}}}p[e]=y}x.frame=!!y;x.frameSize=y;return y},getStyleProxy:function(b){var a=this.styleProxyEl||(Ext.AbstractComponent.prototype.styleProxyEl=Ext.getBody().createChild({style:{position:"absolute",top:"-10000px"}},null,true));a.className=b;return a},getFrameTpl:function(a){return this.getTpl(a?"frameTableTpl":"frameTpl")},frameInfoCache:{}});Ext.define("Ext.state.Provider",{mixins:{observable:Ext.util.Observable},prefix:"ext-",constructor:function(a){a=a||{};var b=this;Ext.apply(b,a);b.addEvents("statechange");b.state={};b.mixins.observable.constructor.call(b)},get:function(b,a){return typeof this.state[b]=="undefined"?a:this.state[b]},clear:function(a){var b=this;delete b.state[a];b.fireEvent("statechange",b,a,null)},set:function(a,c){var b=this;b.state[a]=c;b.fireEvent("statechange",b,a,c)},decodeValue:function(g){var c=this,k=/^(a|n|d|b|s|o|e)\:(.*)$/,b=k.exec(unescape(g)),h,d,a,j,e,i;if(!b||!b[1]){return}d=b[1];g=b[2];switch(d){case"e":return null;case"n":return parseFloat(g);case"d":return new Date(Date.parse(g));case"b":return(g=="1");case"a":h=[];if(g!=""){j=g.split("^");e=j.length;for(i=0;i<e;i++){g=j[i];h.push(c.decodeValue(g))}}return h;case"o":h={};if(g!=""){j=g.split("^");e=j.length;for(i=0;i<e;i++){g=j[i];a=g.split("=");h[a[0]]=c.decodeValue(a[1])}}return h;default:return g}},encodeValue:function(e){var g="",d=0,b,a,c;if(e==null){return"e:1"}else{if(typeof e=="number"){b="n:"+e}else{if(typeof e=="boolean"){b="b:"+(e?"1":"0")}else{if(Ext.isDate(e)){b="d:"+e.toGMTString()}else{if(Ext.isArray(e)){for(a=e.length;d<a;d++){g+=this.encodeValue(e[d]);if(d!=a-1){g+="^"}}b="a:"+g}else{if(typeof e=="object"){for(c in e){if(typeof e[c]!="function"&&e[c]!==undefined){g+=c+"="+this.encodeValue(e[c])+"^"}}b="o:"+g.substring(0,g.length-1)}else{b="s:"+e}}}}}}return escape(b)}});Ext.define("Ext.state.Manager",{singleton:true,constructor:function(){this.provider=new Ext.state.Provider()},setProvider:function(a){this.provider=a},get:function(b,a){return this.provider.get(b,a)},set:function(a,b){this.provider.set(a,b)},clear:function(a){this.provider.clear(a)},getProvider:function(){return this.provider}});Ext.define("Ext.state.Stateful",{mixins:{observable:Ext.util.Observable},stateful:false,saveDelay:100,constructor:function(a){var b=this;a=a||{};if(a.stateful!==undefined){b.stateful=a.stateful}if(a.saveDelay!==undefined){b.saveDelay=a.saveDelay}b.stateId=b.stateId||a.stateId;if(!b.stateEvents){b.stateEvents=[]}if(a.stateEvents){b.stateEvents.concat(a.stateEvents)}this.addEvents("beforestaterestore","staterestore","beforestatesave","statesave");b.mixins.observable.constructor.call(b);if(b.stateful!==false){b.addStateEvents(b.stateEvents);b.initState()}},addStateEvents:function(c){var e=this,b,d,a;if(e.stateful&&e.getStateId()){if(typeof c=="string"){c=Array.prototype.slice.call(arguments,0)}a=e.stateEventsByName||(e.stateEventsByName={});for(b=c.length;b--;){d=c[b];if(!a[d]){a[d]=1;e.on(d,e.onStateChange,e)}}}},onStateChange:function(){var c=this,a=c.saveDelay,d,b;if(!c.stateful){return}if(a){if(!c.stateTask){d=Ext.state.Stateful;b=d.runner||(d.runner=new Ext.util.TaskRunner());c.stateTask=b.newTask({run:c.saveState,scope:c,interval:a,repeat:1})}c.stateTask.start()}else{c.saveState()}},saveState:function(){var b=this,d=b.stateful&&b.getStateId(),a=b.hasListeners,c;if(d){c=b.getState()||{};if(!a.beforestatesave||b.fireEvent("beforestatesave",b,c)!==false){Ext.state.Manager.set(d,c);if(a.statesave){b.fireEvent("statesave",b,c)}}}},getState:function(){return null},applyState:function(a){if(a){Ext.apply(this,a)}},getStateId:function(){var a=this;return a.stateId||(a.autoGenId?null:a.id)},initState:function(){var b=this,d=b.stateful&&b.getStateId(),a=b.hasListeners,c;if(d){c=Ext.state.Manager.get(d);if(c){c=Ext.apply({},c);if(!a.beforestaterestore||b.fireEvent("beforestaterestore",b,c)!==false){b.applyState(c);if(a.staterestore){b.fireEvent("staterestore",b,c)}}}}},savePropToState:function(g,e,d){var b=this,c=b[g],a=b.initialConfig;if(b.hasOwnProperty(g)){if(!a||a[g]!==c){if(e){e[d||g]=c}return true}}return false},savePropsToState:function(e,c){var b=this,a,d;if(typeof e=="string"){b.savePropToState(e,c)}else{for(a=0,d=e.length;a<d;++a){b.savePropToState(e[a],c)}}return c},destroy:function(){var b=this,a=b.stateTask;if(a){a.destroy();b.stateTask=null}b.clearListeners()}});Ext.define("Ext.AbstractComponent",{mixins:{positionable:Ext.util.Positionable,observable:Ext.util.Observable,animate:Ext.util.Animate,elementCt:Ext.util.ElementContainer,renderable:Ext.util.Renderable,state:Ext.state.Stateful},statics:{AUTO_ID:1000,pendingLayouts:null,layoutSuspendCount:0,cancelLayout:function(a,c){var b=this.runningLayoutContext||this.pendingLayouts;if(b){b.cancelComponent(a,false,c)}},flushLayouts:function(){var b=this,a=b.pendingLayouts;if(a&&a.invalidQueue.length){b.pendingLayouts=null;b.runningLayoutContext=a;Ext.override(a,{runComplete:function(){b.runningLayoutContext=null;var c=this.callParent();if(Ext.globalEvents.hasListeners.afterlayout){Ext.globalEvents.fireEvent("afterlayout")}return c}});a.run()}},resumeLayouts:function(a){if(this.layoutSuspendCount&&!--this.layoutSuspendCount){if(a){this.flushLayouts()}if(Ext.globalEvents.hasListeners.resumelayouts){Ext.globalEvents.fireEvent("resumelayouts")}}},suspendLayouts:function(){++this.layoutSuspendCount},updateLayout:function(b,e){var c=this,a=c.runningLayoutContext,d;if(a){a.queueInvalidate(b)}else{d=c.pendingLayouts||(c.pendingLayouts=new Ext.layout.Context());d.queueInvalidate(b);if(!e&&!c.layoutSuspendCount&&!b.isLayoutSuspended()){c.flushLayouts()}}}},isComponent:true,getAutoId:function(){this.autoGenId=true;return ++Ext.AbstractComponent.AUTO_ID},deferLayouts:false,autoGenId:false,renderTpl:"{%this.renderContent(out,values)%}",frameSize:null,tplWriteMode:"overwrite",baseCls:Ext.baseCSSPrefix+"component",disabledCls:Ext.baseCSSPrefix+"item-disabled",ui:"default",uiCls:[],hidden:false,disabled:false,draggable:false,floating:false,hideMode:"display",autoShow:false,autoRender:false,allowDomMove:true,rendered:false,componentLayoutCounter:0,shrinkWrap:2,weight:0,maskOnDisable:true,_isLayoutRoot:false,contentPaddingProperty:"padding",horizontalPosProp:"left",constructor:function(c){var e=this,d,a,b;if(c){Ext.apply(e,c);b=e.xhooks;if(b){delete e.xhooks;Ext.override(e,b)}}else{c={}}e.initialConfig=c;e.mixins.elementCt.constructor.call(e);e.addEvents("beforeactivate","activate","beforedeactivate","deactivate","added","disable","enable","beforeshow","show","beforehide","hide","removed","beforerender","render","afterrender","boxready","beforedestroy","destroy","resize","move","focus","blur");e.getId();e.setupProtoEl();if(e.cls){e.initialCls=e.cls;e.protoEl.addCls(e.cls)}if(e.style){e.initialStyle=e.style;e.protoEl.setStyle(e.style)}e.renderData=e.renderData||{};e.renderSelectors=e.renderSelectors||{};if(e.plugins){e.plugins=e.constructPlugins()}if(!e.hasListeners){e.hasListeners=new e.HasListeners()}e.initComponent();Ext.ComponentManager.register(e);e.mixins.observable.constructor.call(e);e.mixins.state.constructor.call(e,c);this.addStateEvents("resize");if(e.plugins){for(d=0,a=e.plugins.length;d<a;d++){e.plugins[d]=e.initPlugin(e.plugins[d])}}e.loader=e.getLoader();if(e.renderTo){e.render(e.renderTo)}if(e.autoShow&&!e.isContained){e.show()}},initComponent:function(){this.plugins=this.constructPlugins();this.setSize(this.width,this.height)},getState:function(){var b=this,c=null,a=b.getSizeModel();if(a.width.configured){c=b.addPropertyToState(c,"width")}if(a.height.configured){c=b.addPropertyToState(c,"height")}return c},addPropertyToState:function(e,d,c){var b=this,a=arguments.length;if(a==3||b.hasOwnProperty(d)){if(a<3){c=b[d]}if(c!==b.initialConfig[d]){(e||(e={}))[d]=c}}return e},show:Ext.emptyFn,animate:function(c){var t=this,g,l,k,a,d,b,s,p,m,e,q,n,i,o,r,j;c=c||{};d=c.to||{};if(Ext.fx.Manager.hasFxBlock(t.id)){return t}g=Ext.isDefined(d.width);if(g){a=Ext.Number.constrain(d.width,t.minWidth,t.maxWidth)}l=Ext.isDefined(d.height);if(l){k=Ext.Number.constrain(d.height,t.minHeight,t.maxHeight)}if(!c.dynamic&&(g||l)){p=(c.from?c.from.width:undefined)||t.getWidth();m=p;e=(c.from?c.from.height:undefined)||t.getHeight();q=e;n=false;if(l&&k>e){q=k;n=true}if(g&&a>p){m=a;n=true}if(l||g){j=t.el.getStyle("overtflow");if(j!=="hidden"){t.el.setStyle("overflow","hidden")}}if(n){b=!Ext.isNumber(t.width);s=!Ext.isNumber(t.height);t.setSize(m,q);t.el.setSize(p,e);if(b){delete t.width}if(s){delete t.height}}if(g){d.width=a}if(l){d.height=k}}i=t.constrain;o=t.constrainHeader;if(i||o){t.constrain=t.constrainHeader=false;r=c.callback;c.callback=function(){t.constrain=i;t.constrainHeader=o;if(r){r.call(c.scope||t,arguments)}if(j!=="hidden"){t.el.setStyle("overflow",j)}}}return t.mixins.animate.animate.apply(t,arguments)},onHide:function(){if(this.ownerLayout){this.updateLayout({isRoot:false})}},onShow:function(){this.updateLayout({isRoot:false})},constructPlugin:function(b){var a=this;if(typeof b=="string"){b=Ext.PluginManager.create({},b,a)}else{b=Ext.PluginManager.create(b,null,a)}return b},constructPlugins:function(){var e=this,c=e.plugins,b,d,a;if(c){b=[];if(!Ext.isArray(c)){c=[c]}for(d=0,a=c.length;d<a;d++){b[d]=e.constructPlugin(c[d])}}e.pluginsInitialized=true;return b},initPlugin:function(a){a.init(this);return a},addPlugin:function(b){var a=this;b=a.constructPlugin(b);if(a.plugins){a.plugins.push(b)}else{a.plugins=[b]}if(a.pluginsInitialized){a.initPlugin(b)}return b},removePlugin:function(a){Ext.Array.remove(this.plugins,a);a.destroy()},findPlugin:function(a){if(this.plugins){return Ext.Array.findBy(this.plugins,function(b){if(b.ptype===a){return true}})}},beforeLayout:Ext.emptyFn,updateAria:Ext.emptyFn,registerFloatingItem:function(b){var a=this;if(!a.floatingDescendants){a.floatingDescendants=new Ext.ZIndexManager(a)}a.floatingDescendants.register(b)},unregisterFloatingItem:function(b){var a=this;if(a.floatingDescendants){a.floatingDescendants.unregister(b)}},layoutSuspendCount:0,suspendLayouts:function(){var a=this;if(!a.rendered){return}if(++a.layoutSuspendCount==1){a.suspendLayout=true}},resumeLayouts:function(b){var a=this;if(!a.rendered){return}if(!--a.layoutSuspendCount){a.suspendLayout=false;if(b&&!a.isLayoutSuspended()){a.updateLayout(b)}}},setupProtoEl:function(){var a=this.initCls();this.protoEl=new Ext.util.ProtoElement({cls:a.join(" ")})},initCls:function(){var b=this,a=[b.baseCls,b.getComponentLayout().targetCls];if(Ext.isDefined(b.cmpCls)){if(Ext.isDefined(Ext.global.console)){Ext.global.console.warn("Ext.Component: cmpCls has been deprecated. Please use componentCls.")}b.componentCls=b.cmpCls;delete b.cmpCls}if(b.componentCls){a.push(b.componentCls)}else{b.componentCls=b.baseCls}return a},setUI:function(c){var b=this,e=b.uiCls,d=b.activeUI,a;if(c===d){return}if(d){a=b.removeClsWithUI(e,true);if(a.length){b.removeCls(a)}b.removeUIFromElement()}else{b.uiCls=[]}b.ui=c;b.activeUI=c;b.addUIToElement();a=b.addClsWithUI(e,true);if(a.length){b.addCls(a)}if(b.rendered){b.updateLayout()}},addClsWithUI:function(c,j){var h=this,g=[],e=0,d=h.uiCls=Ext.Array.clone(h.uiCls),b=h.activeUI,a,k;if(typeof c==="string"){c=(c.indexOf(" ")<0)?[c]:Ext.String.splitWords(c)}a=c.length;for(;e<a;e++){k=c[e];if(k&&!h.hasUICls(k)){d.push(k);if(b){g=g.concat(h.addUIClsToElement(k))}}}if(j!==true&&b){h.addCls(g)}return g},removeClsWithUI:function(d,l){var k=this,j=[],g=0,a=Ext.Array,h=a.remove,e=k.uiCls=a.clone(k.uiCls),c=k.activeUI,b,m;if(typeof d==="string"){d=(d.indexOf(" ")<0)?[d]:Ext.String.splitWords(d)}b=d.length;for(g=0;g<b;g++){m=d[g];if(m&&k.hasUICls(m)){h(e,m);if(c){j=j.concat(k.removeUIClsFromElement(m))}}}if(l!==true&&c){k.removeCls(j)}return j},hasUICls:function(a){var b=this,c=b.uiCls||[];return Ext.Array.contains(c,a)},frameElementsArray:["tl","tc","tr","ml","mc","mr","bl","bc","br"],addUIClsToElement:function(j){var h=this,b=h.baseCls+"-"+h.ui+"-"+j,k=[Ext.baseCSSPrefix+j,h.baseCls+"-"+j,b],g,e,d,a,c;if(h.rendered&&h.frame&&!Ext.supports.CSS3BorderRadius){g=h.frameElementsArray;e=g.length;for(d=0;d<e;d++){c=g[d];a=h["frame"+c.toUpperCase()];if(a){a.addCls(b+"-"+c)}}}return k},removeUIClsFromElement:function(j){var h=this,b=h.baseCls+"-"+h.ui+"-"+j,k=[Ext.baseCSSPrefix+j,h.baseCls+"-"+j,b],g,e,d,a,c;if(h.rendered&&h.frame&&!Ext.supports.CSS3BorderRadius){g=h.frameElementsArray;e=g.length;for(d=0;d<e;d++){c=g[d];a=h["frame"+c.toUpperCase()];if(a){a.addCls(b+"-"+c)}}}return k},addUIToElement:function(){var g=this,b=g.baseCls+"-"+g.ui,a,e,c,d,h;g.addCls(b);if(g.rendered&&g.frame&&!Ext.supports.CSS3BorderRadius){a=g.frameElementsArray;e=a.length;for(c=0;c<e;c++){h=a[c];d=g["frame"+h.toUpperCase()];if(d){d.addCls(b+"-"+h)}}}},removeUIFromElement:function(){var g=this,b=g.baseCls+"-"+g.ui,a,e,c,d,h;g.removeCls(b);if(g.rendered&&g.frame&&!Ext.supports.CSS3BorderRadius){a=g.frameElementsArray;e=a.length;for(c=0;c<e;c++){h=a[c];d=g["frame"+h.toUpperCase()];if(d){d.removeCls(b+"-"+h)}}}},getTpl:function(a){return Ext.XTemplate.getTpl(this,a)},initStyles:function(k){var g=this,c=Ext.Element,d=g.margin,e=g.border,l=g.cls,a=g.style,i=g.x,h=g.y,b,j;g.initPadding(k);if(d!=null){k.setStyle("margin",this.unitizeBox((d===true)?5:d))}if(e!=null){g.setBorder(e,k)}if(l&&l!=g.initialCls){k.addCls(l);g.cls=g.initialCls=null}if(a&&a!=g.initialStyle){k.setStyle(a);g.style=g.initialStyle=null}if(i!=null){k.setStyle(g.horizontalPosProp,(typeof i=="number")?(i+"px"):i)}if(h!=null){k.setStyle("top",(typeof h=="number")?(h+"px"):h)}if(!g.getFrameInfo()){b=g.width;j=g.height;if(b!=null){if(typeof b==="number"){if(Ext.isBorderBox){k.setStyle("width",b+"px")}}else{k.setStyle("width",b)}}if(j!=null){if(typeof j==="number"){if(Ext.isBorderBox){k.setStyle("height",j+"px")}}else{k.setStyle("height",j)}}}},initPadding:function(c){var a=this,b=a.padding;if(b!=null){if(a.layout&&a.layout.managePadding&&a.contentPaddingProperty==="padding"){c.setStyle("padding",0)}else{c.setStyle("padding",this.unitizeBox((b===true)?5:b))}}},parseBox:function(a){return Ext.dom.Element.parseBox(a)},unitizeBox:function(a){return Ext.dom.Element.unitizeBox(a)},setMargin:function(c,b){var a=this;if(a.rendered){if(!c&&c!==0){c=""}else{if(c===true){c=5}c=this.unitizeBox(c)}a.getTargetEl().setStyle("margin",c);if(!b){a.updateLayout()}}else{a.margin=c}},initEvents:function(){var e=this,h=e.afterRenderEvents,b,d,g,c,a;if(h){for(g in h){d=e[g];if(d&&d.on){b=h[g];for(c=0,a=b.length;c<a;++c){e.mon(d,b[c])}}}}e.addFocusListener()},addFocusListener:function(){var c=this,b=c.getFocusEl(),a;if(b){if(b.isComponent){return b.addFocusListener()}a=b.needsTabIndex();if(!c.focusListenerAdded&&(!a||Ext.FocusManager.enabled)){if(a){b.dom.tabIndex=-1}b.on({focus:c.onFocus,blur:c.onBlur,scope:c});c.focusListenerAdded=true}}},getFocusEl:Ext.emptyFn,isFocusable:function(){var b=this,a;if((b.focusable!==false)&&(a=b.getFocusEl())&&b.rendered&&!b.destroying&&!b.isDestroyed&&!b.disabled&&b.isVisible(true)){return a.isFocusable(true)}},beforeFocus:Ext.emptyFn,onFocus:function(d){var c=this,b=c.focusCls,a=c.getFocusEl();if(!c.disabled){c.beforeFocus(d);if(b&&a){a.addCls(c.addClsWithUI(b,true))}if(!c.hasFocus){c.hasFocus=true;c.fireEvent("focus",c,d)}}},beforeBlur:Ext.emptyFn,onBlur:function(d){var c=this,b=c.focusCls,a=c.getFocusEl();if(c.destroying){return}c.beforeBlur(d);if(b&&a){a.removeCls(c.removeClsWithUI(b,true))}if(c.validateOnBlur){c.validate()}c.hasFocus=false;c.fireEvent("blur",c,d);c.postBlur(d)},postBlur:Ext.emptyFn,is:function(a){return Ext.ComponentQuery.is(this,a)},up:function(b){var a=this.getRefOwner();if(b){for(;a;a=a.getRefOwner()){if(b.isComponent){if(a===b){return a}}else{if(Ext.ComponentQuery.is(a,b)){return a}}}}return a},nextSibling:function(b){var g=this.ownerCt,d,e,a,h;if(g){d=g.items;a=d.indexOf(this)+1;if(a){if(b){for(e=d.getCount();a<e;a++){if((h=d.getAt(a)).is(b)){return h}}}else{if(a<d.getCount()){return d.getAt(a)}}}}return null},previousSibling:function(b){var e=this.ownerCt,d,a,g;if(e){d=e.items;a=d.indexOf(this);if(a!=-1){if(b){for(--a;a>=0;a--){if((g=d.getAt(a)).is(b)){return g}}}else{if(a){return d.getAt(--a)}}}}return null},previousNode:function(b,d){var j=this,h=j.ownerCt,a,g,e,c;if(d&&j.is(b)){return j}if(h){for(g=h.items.items,e=Ext.Array.indexOf(g,j)-1;e>-1;e--){c=g[e];if(c.query){a=c.query(b);a=a[a.length-1];if(a){return a}}if(c.is(b)){return c}}return h.previousNode(b,true)}return null},nextNode:function(d,j){var b=this,c=b.ownerCt,k,e,h,g,a;if(j&&b.is(d)){return b}if(c){for(e=c.items.items,g=Ext.Array.indexOf(e,b)+1,h=e.length;g<h;g++){a=e[g];if(a.is(d)){return a}if(a.down){k=a.down(d);if(k){return k}}}return c.nextNode(d)}return null},getId:function(){return this.id||(this.id="ext-comp-"+(this.getAutoId()))},getItemId:function(){return this.itemId||this.id},getEl:function(){return this.el},getTargetEl:function(){return this.frameBody||this.el},getOverflowEl:function(){return this.getTargetEl()},getOverflowStyle:function(){var e=this,b=null,d,c,a;if(typeof e.autoScroll==="boolean"){b={overflow:a=e.autoScroll?"auto":""};e.scrollFlags={overflowX:a,overflowY:a,x:true,y:true,both:true}}else{d=e.overflowX;c=e.overflowY;if(d!==undefined||c!==undefined){b={overflowX:d=d||"",overflowY:c=c||""};e.scrollFlags={overflowX:d,overflowY:c,x:d=(d==="auto"||d==="scroll"),y:c=(c==="auto"||c==="scroll"),both:d&&c}}else{e.scrollFlags={overflowX:"",overflowY:"",x:false,y:false,both:false}}}if(b&&Ext.isIE7m){b.position="relative"}return b},isXType:function(b,a){if(a){return this.xtype===b}else{return this.xtypesMap[b]}},getXTypes:function(){var c=this.self,d,b,a;if(!c.xtypes){d=[];b=this;while(b){a=b.xtypes;if(a!==undefined){d.unshift.apply(d,a)}b=b.superclass}c.xtypeChain=d;c.xtypes=d.join("/")}return c.xtypes},update:function(b,c,a){var e=this,g=(e.tpl&&!Ext.isString(b)),d;if(g){e.data=b}else{e.html=Ext.isObject(b)?Ext.DomHelper.markup(b):b}if(e.rendered){d=e.isContainer?e.layout.getRenderTarget():e.getTargetEl();if(g){e.tpl[e.tplWriteMode](d,b||{})}else{d.update(e.html,c,a)}e.updateLayout()}},setVisible:function(a){return this[a?"show":"hide"]()},isVisible:function(a){var b=this,c;if(b.hidden||!b.rendered||b.isDestroyed){c=true}else{if(a){c=b.isHierarchicallyHidden()}}return !c},isHierarchicallyHidden:function(){var d=this,c=false,b,a;for(;(b=d.ownerCt||d.floatParent);d=b){a=b.getHierarchyState();if(a.hidden){c=true;break}if(d.getHierarchyState().collapseImmune){if(b.collapsed&&!d.collapseImmune){c=true;break}}else{c=!!a.collapsed;break}}return c},onBoxReady:function(b,a){var c=this;if(c.disableOnBoxReady){c.onDisable()}else{if(c.enableOnBoxReady){c.onEnable()}}if(c.resizable){c.initResizable(c.resizable)}if(c.draggable){c.initDraggable()}if(c.hasListeners.boxready){c.fireEvent("boxready",c,b,a)}},enable:function(a){var b=this;delete b.disableOnBoxReady;b.removeCls(b.disabledCls);if(b.rendered){b.onEnable()}else{b.enableOnBoxReady=true}b.disabled=false;delete b.resetDisable;if(a!==true){b.fireEvent("enable",b)}return b},disable:function(a){var b=this;delete b.enableOnBoxReady;b.addCls(b.disabledCls);if(b.rendered){b.onDisable()}else{b.disableOnBoxReady=true}b.disabled=true;if(a!==true){delete b.resetDisable;b.fireEvent("disable",b)}return b},onEnable:function(){if(this.maskOnDisable){this.el.dom.disabled=false;this.unmask()}},onDisable:function(){var c=this,b=c.focusCls,a=c.getFocusEl();if(b&&a){a.removeCls(c.removeClsWithUI(b,true))}if(c.maskOnDisable){c.el.dom.disabled=true;c.mask()}},mask:function(){var b=this.lastBox,c=this.getMaskTarget(),a=[];if(b){a[2]=b.height}c.mask.apply(c,a)},unmask:function(){this.getMaskTarget().unmask()},getMaskTarget:function(){return this.el},isDisabled:function(){return this.disabled},setDisabled:function(a){return this[a?"disable":"enable"]()},isHidden:function(){return this.hidden},addCls:function(a){var c=this,b=c.rendered?c.el:c.protoEl;b.addCls.apply(b,arguments);return c},addClass:function(){return this.addCls.apply(this,arguments)},hasCls:function(a){var c=this,b=c.rendered?c.el:c.protoEl;return b.hasCls.apply(b,arguments)},removeCls:function(a){var c=this,b=c.rendered?c.el:c.protoEl;b.removeCls.apply(b,arguments);return c},addOverCls:function(){var a=this;if(!a.disabled){a.el.addCls(a.overCls)}},removeOverCls:function(){this.el.removeCls(this.overCls)},addListener:function(b,g,e,a){var h=this,d,c;if(Ext.isString(b)&&(Ext.isObject(g)||a&&a.element)){if(a.element){d=g;g={};g[b]=d;b=a.element;if(e){g.scope=e}for(c in a){if(a.hasOwnProperty(c)){if(h.eventOptionsRe.test(c)){g[c]=a[c]}}}}if(h[b]&&h[b].on){h.mon(h[b],g)}else{h.afterRenderEvents=h.afterRenderEvents||{};if(!h.afterRenderEvents[b]){h.afterRenderEvents[b]=[]}h.afterRenderEvents[b].push(g)}return}return h.mixins.observable.addListener.apply(h,arguments)},removeManagedListenerItem:function(b,a,i,d,g,e){var h=this,c=a.options?a.options.element:null;if(c){c=h[c];if(c&&c.un){if(b||(a.item===i&&a.ename===d&&(!g||a.fn===g)&&(!e||a.scope===e))){c.un(a.ename,a.fn,a.scope);if(!b){Ext.Array.remove(h.managedListeners,a)}}}}else{return h.mixins.observable.removeManagedListenerItem.apply(h,arguments)}},getBubbleTarget:function(){return this.ownerCt},isFloating:function(){return this.floating},isDraggable:function(){return !!this.draggable},isDroppable:function(){return !!this.droppable},onAdded:function(a,c){var b=this;b.ownerCt=a;if(b.hierarchyState){b.hierarchyState.invalid=true;delete b.hierarchyState}if(b.hasListeners.added){b.fireEvent("added",b,a,c)}},onRemoved:function(b){var a=this;if(a.hasListeners.removed){a.fireEvent("removed",a,a.ownerCt)}delete a.ownerCt;delete a.ownerLayout},beforeDestroy:Ext.emptyFn,onResize:function(c,a,b,e){var d=this;if(d.floating&&d.constrain){d.doConstrain()}if(d.hasListeners.resize){d.fireEvent("resize",d,c,a,b,e)}},setSize:function(b,a){var c=this;if(b&&typeof b=="object"){a=b.height;b=b.width}if(typeof b=="number"){c.width=Ext.Number.constrain(b,c.minWidth,c.maxWidth)}else{if(b===null){delete c.width}}if(typeof a=="number"){c.height=Ext.Number.constrain(a,c.minHeight,c.maxHeight)}else{if(a===null){delete c.height}}if(c.rendered&&c.isVisible()){c.updateLayout({isRoot:false})}return c},isLayoutRoot:function(){var a=this,b=a.ownerLayout;if(!b||a._isLayoutRoot||a.floating){return true}return b.isItemLayoutRoot(a)},isLayoutSuspended:function(){var a=this,b;while(a){if(a.layoutSuspendCount||a.suspendLayout){return true}b=a.ownerLayout;if(!b){break}a=b.owner}return false},updateLayout:function(c){var d=this,e,b=d.lastBox,a=c&&c.isRoot;if(b){b.invalid=true}if(!d.rendered||d.layoutSuspendCount||d.suspendLayout){return}if(d.hidden){Ext.AbstractComponent.cancelLayout(d)}else{if(typeof a!="boolean"){a=d.isLayoutRoot()}}if(a||!d.ownerLayout||!d.ownerLayout.onContentChange(d)){if(!d.isLayoutSuspended()){e=(c&&c.hasOwnProperty("defer"))?c.defer:d.deferLayouts;Ext.AbstractComponent.updateLayout(d,e)}}},getSizeModel:function(j){var n=this,a=Ext.layout.SizeModel,d=n.componentLayout.ownerContext,b=n.width,p=n.height,q,c,g,e,h,o,l,m,k,i;if(d){i=d.widthModel;h=d.heightModel}if(!i||!h){g=((q=typeof b)=="number");e=((c=typeof p)=="number");k=n.floating||!(o=n.ownerLayout);if(k){l=Ext.layout.Layout.prototype.autoSizePolicy;m=n.floating?3:n.shrinkWrap;if(g){i=a.configured}if(e){h=a.configured}}else{l=o.getItemSizePolicy(n,j);m=o.isItemShrinkWrap(n)}if(d){d.ownerSizePolicy=l}m=(m===true)?3:(m||0);if(k&&m){if(b&&q=="string"){m&=2}if(p&&c=="string"){m&=1}}if(m!==3){if(!j){j=n.ownerCt&&n.ownerCt.getSizeModel()}if(j){m|=(j.width.shrinkWrap?1:0)|(j.height.shrinkWrap?2:0)}}if(!i){if(!l.setsWidth){if(g){i=a.configured}else{i=(m&1)?a.shrinkWrap:a.natural}}else{if(l.readsWidth){if(g){i=a.calculatedFromConfigured}else{i=(m&1)?a.calculatedFromShrinkWrap:a.calculatedFromNatural}}else{i=a.calculated}}}if(!h){if(!l.setsHeight){if(e){h=a.configured}else{h=(m&2)?a.shrinkWrap:a.natural}}else{if(l.readsHeight){if(e){h=a.calculatedFromConfigured}else{h=(m&2)?a.calculatedFromShrinkWrap:a.calculatedFromNatural}}else{h=a.calculated}}}}return i.pairsByHeightOrdinal[h.ordinal]},isDescendant:function(a){if(a.isContainer){for(var b=this.ownerCt;b;b=b.ownerCt){if(b===a){return true}}}return false},doComponentLayout:function(){this.updateLayout();return this},forceComponentLayout:function(){this.updateLayout()},setComponentLayout:function(b){var a=this.componentLayout;if(a&&a.isLayout&&a!=b){a.setOwner(null)}this.componentLayout=b;b.setOwner(this)},getComponentLayout:function(){var a=this;if(!a.componentLayout||!a.componentLayout.isLayout){a.setComponentLayout(Ext.layout.Layout.create(a.componentLayout,"autocomponent"))}return a.componentLayout},afterComponentLayout:function(c,a,b,e){var d=this;if(++d.componentLayoutCounter===1){d.afterFirstLayout(c,a)}if(c!==b||a!==e){d.onResize(c,a,b,e)}},beforeComponentLayout:function(b,a){return true},setPosition:function(a,e,b){var c=this,d=c.beforeSetPosition.apply(c,arguments);if(d&&c.rendered){a=d.x;e=d.y;if(b){if(a!==c.getLocalX()||e!==c.getLocalY()){c.stopAnimation();c.animate(Ext.apply({duration:1000,listeners:{afteranimate:Ext.Function.bind(c.afterSetPosition,c,[a,e])},to:{x:a,y:e}},b))}}else{c.setLocalXY(a,e);c.afterSetPosition(a,e)}}return c},beforeSetPosition:function(a,e,b){var d,c;if(a){if(Ext.isNumber(c=a[0])){b=e;e=a[1];a=c}else{if((c=a.x)!==undefined){b=e;e=a.y;a=c}}}if(this.constrain||this.constrainHeader){d=this.calculateConstrainedPosition(null,[a,e],true);if(d){a=d[0];e=d[1]}}d={x:this.x=a,y:this.y=e,anim:b,hasX:a!==undefined,hasY:e!==undefined};return(d.hasX||d.hasY)?d:null},afterSetPosition:function(a,c){var b=this;b.onPosition(a,c);if(b.hasListeners.move){b.fireEvent("move",b,a,c)}},onPosition:Ext.emptyFn,setWidth:function(a){return this.setSize(a)},setHeight:function(a){return this.setSize(undefined,a)},getSize:function(){return this.el.getSize()},getWidth:function(){return this.el.getWidth()},getHeight:function(){return this.el.getHeight()},getLoader:function(){var c=this,b=c.autoLoad?(Ext.isObject(c.autoLoad)?c.autoLoad:{url:c.autoLoad}):null,a=c.loader||b;if(a){if(!a.isLoader){c.loader=new Ext.ComponentLoader(Ext.apply({target:c,autoLoad:b},a))}else{a.setTarget(c)}return c.loader}return null},setDocked:function(b,c){var a=this;a.dock=b;if(c&&a.ownerCt&&a.rendered){a.ownerCt.updateLayout()}return a},setBorder:function(b,d){var c=this,a=!!d;if(c.rendered||a){if(!a){d=c.el}if(!b){b=0}else{if(b===true){b="1px"}else{b=this.unitizeBox(b)}}d.setStyle("border-width",b);if(!a){c.updateLayout()}}c.border=b},onDestroy:function(){var a=this;if(a.monitorResize&&Ext.EventManager.resizeEvent){Ext.EventManager.resizeEvent.removeListener(a.setSize,a)}Ext.destroy(a.componentLayout,a.loadMask,a.floatingDescendants)},destroy:function(){var d=this,b=d.renderSelectors,a,c;if(!d.isDestroyed){if(!d.hasListeners.beforedestroy||d.fireEvent("beforedestroy",d)!==false){d.destroying=true;d.beforeDestroy();if(d.floating){delete d.floatParent;if(d.zIndexManager){d.zIndexManager.unregister(d)}}else{if(d.ownerCt&&d.ownerCt.remove){d.ownerCt.remove(d,false)}}d.stopAnimation();d.onDestroy();Ext.destroy(d.plugins);if(d.hasListeners.destroy){d.fireEvent("destroy",d)}Ext.ComponentManager.unregister(d);d.mixins.state.destroy.call(d);d.clearListeners();if(d.rendered){if(!d.preserveElOnDestroy){d.el.remove()}d.mixins.elementCt.destroy.call(d);if(b){for(a in b){if(b.hasOwnProperty(a)){c=d[a];if(c){delete d[a];c.remove()}}}}delete d.el;delete d.frameBody;delete d.rendered}d.destroying=false;d.isDestroyed=true}}},getPlugin:function(b){var c=0,a=this.plugins,d=a.length;for(;c<d;c++){if(a[c].pluginId===b){return a[c]}}},isDescendantOf:function(a){return !!this.findParentBy(function(b){return b===a})},getHierarchyState:function(a){var e=this,i=(a&&e.hierarchyStateInner)||e.hierarchyState,c=e.ownerCt,b,d,g,h;if(!i||i.invalid){b=e.getRefOwner();if(c){h=e.ownerLayout===c.layout}e.hierarchyState=i=Ext.Object.chain(b?b.getHierarchyState(h):Ext.rootHierarchyState);e.initHierarchyState(i);if((d=e.componentLayout).initHierarchyState){d.initHierarchyState(i)}if(e.isContainer){e.hierarchyStateInner=g=Ext.Object.chain(i);d=e.layout;if(d&&d.initHierarchyState){d.initHierarchyState(g,i)}if(a){i=g}}}return i},initHierarchyState:function(b){var a=this;if(a.collapsed){b.collapsed=true}if(a.hidden){b.hidden=true}if(a.collapseImmune){b.collapseImmune=true}},getAnchorToXY:function(d,a,c,b){return d.getAnchorXY(a,c,b)},getBorderPadding:function(){return this.el.getBorderPadding()},getLocalX:function(){return this.el.getLocalX()},getLocalXY:function(){return this.el.getLocalXY()},getLocalY:function(){return this.el.getLocalY()},getX:function(){return this.el.getX()},getXY:function(){return this.el.getXY()},getY:function(){return this.el.getY()},setLocalX:function(a){this.el.setLocalX(a)},setLocalXY:function(a,b){this.el.setLocalXY(a,b)},setLocalY:function(a){this.el.setLocalY(a)},setX:function(a,b){this.el.setX(a,b)},setXY:function(b,a){this.el.setXY(b,a)},setY:function(b,a){this.el.setY(b,a)}},function(){var a=this;a.createAlias({on:"addListener",prev:"previousSibling",next:"nextSibling"});Ext.resumeLayouts=function(b){a.resumeLayouts(b)};Ext.suspendLayouts=function(){a.suspendLayouts()};Ext.batchLayouts=function(c,b){a.suspendLayouts();c.call(b);a.resumeLayouts(true)}});Ext.define("Ext.AbstractPlugin",{disabled:false,isPlugin:true,constructor:function(a){this.pluginConfig=a;Ext.apply(this,a)},clonePlugin:function(a){return new this.self(Ext.apply({},a,this.pluginConfig))},setCmp:function(a){this.cmp=a},getCmp:function(){return this.cmp},init:Ext.emptyFn,destroy:Ext.emptyFn,enable:function(){this.disabled=false},disable:function(){this.disabled=true}});Ext.define("Ext.Action",{constructor:function(a){this.initialConfig=a;this.itemId=a.itemId=(a.itemId||a.id||Ext.id());this.items=[]},isAction:true,setText:function(a){this.initialConfig.text=a;this.callEach("setText",[a])},getText:function(){return this.initialConfig.text},setIconCls:function(a){this.initialConfig.iconCls=a;this.callEach("setIconCls",[a])},getIconCls:function(){return this.initialConfig.iconCls},setDisabled:function(a){this.initialConfig.disabled=a;this.callEach("setDisabled",[a])},enable:function(){this.setDisabled(false)},disable:function(){this.setDisabled(true)},isDisabled:function(){return this.initialConfig.disabled},setHidden:function(a){this.initialConfig.hidden=a;this.callEach("setVisible",[!a])},show:function(){this.setHidden(false)},hide:function(){this.setHidden(true)},isHidden:function(){return this.initialConfig.hidden},setHandler:function(b,a){this.initialConfig.handler=b;this.initialConfig.scope=a;this.callEach("setHandler",[b,a])},each:function(b,a){Ext.each(this.items,b,a)},callEach:function(g,c){var b=this.items,d=0,a=b.length,e;Ext.suspendLayouts();for(;d<a;d++){e=b[d];e[g].apply(e,c)}Ext.resumeLayouts(true)},addComponent:function(a){this.items.push(a);a.on("destroy",this.removeComponent,this)},removeComponent:function(a){Ext.Array.remove(this.items,a)},execute:function(){this.initialConfig.handler.apply(this.initialConfig.scope||Ext.global,arguments)}});Ext.define("Ext.data.flash.BinaryXhr",{statics:{flashPluginActivated:function(){Ext.data.flash.BinaryXhr.flashPluginActive=true;Ext.data.flash.BinaryXhr.flashPlugin=document.getElementById("ext-flash-polyfill");Ext.globalEvents.fireEvent("flashready")},flashPluginActive:false,flashPluginInjected:false,connectionIndex:1,liveConnections:{},flashPlugin:null,onFlashStateChange:function(d,c,b){var a;a=this.liveConnections[Number(d)];if(a){a.onFlashStateChange(c,b)}},registerConnection:function(b){var a=this.connectionIndex;this.conectionIndex=this.connectionIndex+1;this.liveConnections[a]=b;return a},injectFlashPlugin:function(){var g,b,c,a,e=this,d,h;a=document.createElement("img");a.setAttribute("src",window.location.protocol+"//www.adobe.com/images/shared/download_buttons/get_flash_player.gif");a.setAttribute("alt","Get Adobe Flash player");c=document.createElement("a");c.setAttribute("href","http://www.adobe.com/go/getflashplayer");c.appendChild(a);b=document.createElement("p");b.innerHTML="To view this page ensure that Adobe Flash Player version 11.1.0 or greater is installed.";g=document.createElement("div");g.setAttribute("id","ext-flash-polyfill");g.appendChild(b);g.appendChild(a);Ext.getBody().dom.appendChild(g);d=[Ext.Loader.getPath("Ext.data.Connection"),"../../../plugins/flash/swfobject.js"].join("/");h="/plugins/flash/FlashPlugin.swf";if(Ext.flashPluginPath){h=Ext.flashPluginPath}Ext.Loader.loadScript({url:d,onLoad:function(){var j="11.4.0";var l="playerProductInstall.swf";var i={};var m={};m.quality="high";m.bgcolor="#ffffff";m.allowscriptaccess="sameDomain";m.allowfullscreen="true";var k={};k.id="ext-flash-polyfill";k.name="polyfill";k.align="middle";swfobject.embedSWF(h,"ext-flash-polyfill","0","0",j,l,i,m,k)},onError:function(){},scope:e});Ext.globalEvents.addEvents("flashready");Ext.data.flash.BinaryXhr.flashPluginInjected=true}},readyState:0,status:0,statusText:"",responseBytes:null,javascriptId:null,constructor:function(a){if(!Ext.data.flash.BinaryXhr.flashPluginInjected){Ext.data.flash.BinaryXhr.injectFlashPlugin()}var b=this;Ext.apply(b,a);b.requestHeaders={}},abort:function(){var a=this;if(a.readyState==4){return}a.aborted=true;if(!Ext.data.flash.BinaryXhr.flashPluginActive){Ext.globalEvents.removeListener("flashready",a.onFlashReady,a);return}Ext.data.flash.BinaryXhr.flashPlugin.abortRequest(a.javascriptId);delete Ext.data.flash.BinaryXhr.liveConnections[a.javascriptId]},getAllResponseHeaders:function(){var a=[];Ext.Object.each(this.responseHeaders,function(b,c){a.push(b+": "+c)});return a.join("\x0d\x0a")},getResponseHeader:function(b){var a=this.responseHeaders;return(a&&a[b])||null},open:function(g,c,d,a,b){var e=this;e.method=g;e.url=c;e.async=d!==false;e.user=a;e.password=b},overrideMimeType:function(a){this.mimeType=a},send:function(a){var b=this;b.body=a;if(!Ext.data.flash.BinaryXhr.flashPluginActive){Ext.globalEvents.addListener("flashready",b.onFlashReady,b)}else{this.onFlashReady()}},onFlashReady:function(){var c=this,b,a;c.javascriptId=Ext.data.flash.BinaryXhr.registerConnection(c);b={method:c.method,url:c.url,user:c.user,password:c.password,mimeType:c.mimeType,requestHeaders:c.requestHeaders,body:c.body,javascriptId:c.javascriptId};a=Ext.data.flash.BinaryXhr.flashPlugin.postBinary(b)},setReadyState:function(b){var a=this;if(a.readyState!=b){a.readyState=b;a.onreadystatechange()}},setRequestHeader:function(b,a){this.requestHeaders[b]=a},onreadystatechange:Ext.emptyFn,parseData:function(b){var a=this;this.status=b.status||0;a.responseHeaders={};if(a.mimeType){a.responseHeaders["content-type"]=a.mimeType}if(b.reason=="complete"){this.responseBytes=b.data;a.responseHeaders["content-length"]=b.data.length}else{if(b.reason=="error"||b.reason=="securityError"){this.statusText=b.text;a.responseHeaders["content-length"]=0}}},onFlashStateChange:function(c,b){var a=this;if(c==4){a.parseData(b);delete Ext.data.flash.BinaryXhr.liveConnections[a.javascriptId]}a.setReadyState(c)}});Ext.define("Ext.data.Connection",{mixins:{observable:Ext.util.Observable},statics:{requestId:0},url:null,async:true,method:null,username:"",password:"",disableCaching:true,withCredentials:false,binary:false,cors:false,isXdr:false,defaultXdrContentType:"text/plain",disableCachingParam:"_dc",timeout:30000,useDefaultHeader:true,defaultPostHeader:"application/x-www-form-urlencoded; charset=UTF-8",useDefaultXhrHeader:true,defaultXhrHeader:"XMLHttpRequest",constructor:function(a){a=a||{};Ext.apply(this,a);this.requests={};this.mixins.observable.constructor.call(this)},request:function(k){k=k||{};var g=this,j=k.scope||window,e=k.username||g.username,h=k.password||g.password||"",b,c,d,a,i;if(g.fireEvent("beforerequest",g,k)!==false){c=g.setOptions(k,j);if(g.isFormUpload(k)){g.upload(k.form,c.url,c.data,k);return null}if(k.autoAbort||g.autoAbort){g.abort()}b=k.async!==false?(k.async||g.async):false;i=g.openRequest(k,c,b,e,h);if(!g.isXdr){a=g.setupHeaders(i,k,c.data,c.params)}d={id:++Ext.data.Connection.requestId,xhr:i,headers:a,options:k,async:b,binary:k.binary||g.binary,timeout:setTimeout(function(){d.timedout=true;g.abort(d)},k.timeout||g.timeout)};g.requests[d.id]=d;g.latestId=d.id;if(b){if(!g.isXdr){i.onreadystatechange=Ext.Function.bind(g.onStateChange,g,[d])}}if(g.isXdr){g.processXdrRequest(d,i)}i.send(c.data);if(!b){return g.onComplete(d)}return d}else{Ext.callback(k.callback,k.scope,[k,undefined,undefined]);return null}},processXdrRequest:function(b,c){var a=this;delete b.headers;b.contentType=b.options.contentType||a.defaultXdrContentType;c.onload=Ext.Function.bind(a.onStateChange,a,[b,true]);c.onerror=c.ontimeout=Ext.Function.bind(a.onStateChange,a,[b,false])},processXdrResponse:function(a,b){a.getAllResponseHeaders=function(){return[]};a.getResponseHeader=function(){return""};a.contentType=b.contentType||this.defaultXdrContentType},upload:function(b,g,s,e){b=Ext.getDom(b);e=e||{};var n=Ext.id(),l=document.createElement("iframe"),c=[],d="multipart/form-data",r={target:b.target,method:b.method,encoding:b.encoding,enctype:b.enctype,action:b.action},a=function(h,u){i=document.createElement("input");Ext.fly(i).set({type:"hidden",value:u,name:h});b.appendChild(i);c.push(i)},i,k,p,t,o,j,m,q;Ext.fly(l).set({id:n,name:n,cls:Ext.baseCSSPrefix+"hide-display",src:Ext.SSL_SECURE_URL});document.body.appendChild(l);if(document.frames){document.frames[n].name=n}Ext.fly(b).set({target:n,method:"POST",enctype:d,encoding:d,action:g||r.action});if(s){k=Ext.Object.fromQueryString(s)||{};for(t in k){if(k.hasOwnProperty(t)){p=k[t];if(Ext.isArray(p)){o=p.length;for(j=0;j<o;j++){a(t,p[j])}}else{a(t,p)}}}}Ext.fly(l).on("load",Ext.Function.bind(this.onUploadComplete,this,[l,e]),null,{single:!Ext.isOpera});b.submit();Ext.fly(b).set(r);m=c.length;for(q=0;q<m;q++){Ext.removeNode(c[q])}},onUploadComplete:function(a,k){var g=this,b={responseText:"",responseXML:null},i,j,h,c;try{h=a.contentWindow.document||a.contentDocument||window.frames[a.id].document;if(h){if(Ext.isOpera&&h.location=="about:blank"){return}if(h.body){if((c=h.body.firstChild)&&/pre/i.test(c.tagName)){b.responseText=c.textContent}else{if((c=h.getElementsByTagName("textarea")[0])){b.responseText=c.value}else{b.responseText=h.body.textContent||h.body.innerText}}}b.responseXML=h.XMLDocument||h;i=k.success;j=true}}catch(d){b.responseText='{success:false,message:"'+Ext.String.trim(d.message||d.description)+'"}';i=k.failure;j=false}g.fireEvent("requestcomplete",g,b,k);Ext.callback(i,k.scope,[b,k]);Ext.callback(k.callback,k.scope,[k,j,b]);setTimeout(function(){Ext.removeNode(a)},100)},isFormUpload:function(a){var b=this.getForm(a);if(b){return(a.isUpload||(/multipart\/form-data/i).test(b.getAttribute("enctype")))}return false},getForm:function(a){return Ext.getDom(a.form)||null},setOptions:function(l,k){var i=this,e=l.params||{},h=i.extraParams,d=l.urlParams,c=l.url||i.url,j=l.jsonData,b,a,g;if(Ext.isFunction(e)){e=e.call(k,l)}if(Ext.isFunction(c)){c=c.call(k,l)}c=this.setupUrl(l,c);g=l.rawData||l.binaryData||l.xmlData||j||null;if(j&&!Ext.isPrimitive(j)){g=Ext.encode(g)}if(l.binaryData){if(i.nativeBinaryPostSupport()){g=(new Uint8Array(l.binaryData));if((Ext.isChrome&&Ext.chromeVersion<22)||Ext.isSafari||Ext.isGecko){g=g.buffer}}}if(Ext.isObject(e)){e=Ext.Object.toQueryString(e)}if(Ext.isObject(h)){h=Ext.Object.toQueryString(h)}e=e+((h)?((e)?"&":"")+h:"");d=Ext.isObject(d)?Ext.Object.toQueryString(d):d;e=this.setupParams(l,e);b=(l.method||i.method||((e||g)?"POST":"GET")).toUpperCase();this.setupMethod(l,b);a=l.disableCaching!==false?(l.disableCaching||i.disableCaching):false;if(b==="GET"&&a){c=Ext.urlAppend(c,(l.disableCachingParam||i.disableCachingParam)+"="+(new Date().getTime()))}if((b=="GET"||g)&&e){c=Ext.urlAppend(c,e);e=null}if(d){c=Ext.urlAppend(c,d)}return{url:c,method:b,data:g||e||null}},setupUrl:function(b,a){var c=this.getForm(b);if(c){a=a||c.action}return a},setupParams:function(a,d){var c=this.getForm(a),b;if(c&&!this.isFormUpload(a)){b=Ext.Element.serializeForm(c);d=d?(d+"&"+b):b}return d},setupMethod:function(a,b){if(this.isFormUpload(a)){return"POST"}return b},setupHeaders:function(m,n,d,c){var i=this,b=Ext.apply({},n.headers||{},i.defaultHeaders||{}),l=i.defaultPostHeader,j=n.jsonData,a=n.xmlData,k,g;if(!b["Content-Type"]&&(d||c)){if(d){if(n.rawData){l="text/plain"}else{if(a&&Ext.isDefined(a)){l="text/xml"}else{if(j&&Ext.isDefined(j)){l="application/json"}}}}b["Content-Type"]=l}if(i.useDefaultXhrHeader&&!b["X-Requested-With"]){b["X-Requested-With"]=i.defaultXhrHeader}try{for(k in b){if(b.hasOwnProperty(k)){g=b[k];m.setRequestHeader(k,g)}}}catch(h){i.fireEvent("exception",k,g)}return b},newRequest:function(a){var b=this,c;if(a.binaryData){if(b.nativeBinaryPostSupport()){c=this.getXhrInstance()}else{c=new Ext.data.flash.BinaryXhr()}}else{if((a.cors||b.cors)&&Ext.isIE&&Ext.ieVersion<=9){c=b.getXdrInstance();b.isXdr=true}else{c=b.getXhrInstance()}}return c},openRequest:function(c,a,d,h,b){var e=this,g=e.newRequest(c);if(h){g.open(a.method,a.url,d,h,b)}else{if(e.isXdr){g.open(a.method,a.url)}else{g.open(a.method,a.url,d)}}if(c.binary||e.binary){if(window.Uint8Array){g.responseType="arraybuffer"}else{if(g.overrideMimeType){g.overrideMimeType("text/plain; charset=x-user-defined")}}}if(c.withCredentials||e.withCredentials){g.withCredentials=true}return g},getXdrInstance:function(){var a;if(Ext.ieVersion>=8){a=new XDomainRequest()}else{Ext.Error.raise({msg:"Your browser does not support CORS"})}return a},getXhrInstance:(function(){var b=[function(){return new XMLHttpRequest()},function(){return new ActiveXObject("MSXML2.XMLHTTP.3.0")},function(){return new ActiveXObject("MSXML2.XMLHTTP")},function(){return new ActiveXObject("Microsoft.XMLHTTP")}],c=0,a=b.length,g;for(;c<a;++c){try{g=b[c];g();break}catch(d){}}return g}()),isLoading:function(a){if(!a){a=this.getLatest()}if(!(a&&a.xhr)){return false}var b=a.xhr.readyState;return((a.xhr instanceof Ext.data.flash.BinaryXhr)&&b!=4)||!(b===0||b==4)},abort:function(b){var a=this,d;if(!b){b=a.getLatest()}if(b&&a.isLoading(b)){d=b.xhr;try{d.onreadystatechange=null}catch(c){d.onreadystatechange=Ext.emptyFn}d.abort();a.clearTimeout(b);if(!b.timedout){b.aborted=true}a.onComplete(b);a.cleanup(b)}},abortAll:function(){var b=this.requests,a;for(a in b){if(b.hasOwnProperty(a)){this.abort(b[a])}}},getLatest:function(){var b=this.latestId,a;if(b){a=this.requests[b]}return a||null},onStateChange:function(c,a){var b=this;if((c.xhr&&c.xhr.readyState==4)||b.isXdr){b.clearTimeout(c);b.onComplete(c,a);b.cleanup(c);Ext.EventManager.idleEvent.fire()}},clearTimeout:function(a){clearTimeout(a.timeout);delete a.timeout},cleanup:function(a){a.xhr=null;delete a.xhr},onComplete:function(h,d){var g=this,c=h.options,a,j,b;try{a=g.parseStatus(h.xhr.status)}catch(i){a={success:false,isException:false}}j=g.isXdr?d:a.success;if(j){b=g.createResponse(h);g.fireEvent("requestcomplete",g,b,c);Ext.callback(c.success,c.scope,[b,c])}else{if(a.isException||h.aborted||h.timedout){b=g.createException(h)}else{b=g.createResponse(h)}g.fireEvent("requestexception",g,b,c);Ext.callback(c.failure,c.scope,[b,c])}Ext.callback(c.callback,c.scope,[c,j,b]);delete g.requests[h.id];return b},parseStatus:function(a){a=a==1223?204:a;var c=(a>=200&&a<300)||a==304,b=false;if(!c){switch(a){case 12002:case 12029:case 12030:case 12031:case 12152:case 13030:b=true;break}}return{success:c,isException:b}},createResponse:function(e){var i=this,k=e.xhr,c=i.isXdr,b={},l=c?[]:k.getAllResponseHeaders().replace(/\r\n/g,"\n").split("\n"),h=l.length,m,g,j,d,a;while(h--){m=l[h];g=m.indexOf(":");if(g>=0){j=m.substr(0,g).toLowerCase();if(m.charAt(g+1)==" "){++g}b[j]=m.substr(g+1)}}e.xhr=null;delete e.xhr;d={request:e,requestId:e.id,status:k.status,statusText:k.statusText,getResponseHeader:function(n){return b[n.toLowerCase()]},getAllResponseHeaders:function(){return b}};if(c){i.processXdrResponse(d,k)}if(e.binary){d.responseBytes=i.getByteArray(k)}else{d.responseText=k.responseText;d.responseXML=k.responseXML}k=null;return d},createException:function(a){return{request:a,requestId:a.id,status:a.aborted?-1:0,statusText:a.aborted?"transaction aborted":"communication failure",aborted:a.aborted,timedout:a.timedout}},getByteArray:function(k){var c=k.response,j=k.responseBody,b,g,a,d;if(k instanceof Ext.data.flash.BinaryXhr){b=k.responseBytes}else{if(window.Uint8Array){b=c?new Uint8Array(c):[]}else{if(Ext.isIE9p){try{b=new VBArray(j).toArray()}catch(h){b=[]}}else{if(Ext.isIE){if(!this.self.vbScriptInjected){this.injectVBScript()}getIEByteArray(k.responseBody,b=[])}else{b=[];g=k.responseText;a=g.length;for(d=0;d<a;d++){b.push(g.charCodeAt(d)&255)}}}}}return b},injectVBScript:function(){var a=document.createElement("script");a.type="text/vbscript";a.text=["Function getIEByteArray(byteArray, out)","Dim len, i","len = LenB(byteArray)","For i = 1 to len","out.push(AscB(MidB(byteArray, i, 1)))","Next","End Function"].join("\n");Ext.getHead().dom.appendChild(a);this.self.vbScriptInjected=true},nativeBinaryPostSupport:function(){return Ext.isChrome||(Ext.isSafari&&Ext.isDefined(window.Uint8Array))||(Ext.isGecko&&Ext.isDefined(window.Uint8Array))}});Ext.define("Ext.Ajax",{extend:Ext.data.Connection,singleton:true,autoAbort:false});Ext.define("Ext.util.Floating",{focusOnToFront:true,shadow:"sides",constrain:false,constructor:function(b){var a=this;a.fixed=a.fixed&&!(Ext.isIE6||Ext.isIEQuirks);a.el=new Ext.dom.Layer(Ext.apply({hideMode:a.hideMode,hidden:a.hidden,shadow:(typeof a.shadow!="undefined")?a.shadow:"sides",shadowOffset:a.shadowOffset,constrain:false,fixed:a.fixed,shim:(a.shim===false)?false:undefined},a.floating),b);if(a.modal&&!(Ext.FocusManager&&Ext.FocusManager.enabled)){a.mon(a.el,{keydown:a.onKeyDown,scope:a})}a.mon(a.el,{mousedown:a.onMouseDown,scope:a});a.floating=true;a.registerWithOwnerCt();a.initHierarchyEvents()},initHierarchyEvents:function(){var b=this,a=this.syncHidden;if(!b.hasHierarchyEventListeners){b.mon(b.hierarchyEventSource,{hide:a,collapse:a,show:a,expand:a,added:a,scope:b});b.hasHierarchyEventListeners=true}},registerWithOwnerCt:function(){var c=this,b=c.ownerCt,a=c.zIndexParent;if(a){a.unregisterFloatingItem(c)}a=c.zIndexParent=c.up("[floating]");c.setFloatParent(b||a);delete c.ownerCt;if(a){a.registerFloatingItem(c)}else{Ext.WindowManager.register(c)}},onKeyDown:function(d){var c=this,a,h,g,b;if(d.getKey()==Ext.EventObject.TAB){a=d.shiftKey;h=c.el.query(":focusable");g=h[0];b=h[h.length-1];if(g&&b&&d.target===(a?g:b)){d.stopEvent();(a?b:g).focus(false,true)}}},onMouseDown:function(a){if(this.floating){this.toFront(!!a.getTarget(":focusable"))}},setFloatParent:function(b){var a=this;a.floatParent=b;if((a.constrain||a.constrainHeader)&&!a.constrainTo){a.constrainTo=b?b.getTargetEl():a.container}},onAfterFloatLayout:function(){this.syncShadow()},syncHidden:function(){var c=this,d=c.hidden||!c.rendered,a=c.hierarchicallyHidden=c.isHierarchicallyHidden(),b=c.pendingShow;if(d!==a){if(a){c.hide();c.pendingShow=true}else{if(b){delete c.pendingShow;if(b.length){c.show.apply(c,b)}else{c.show()}}}}},setZIndex:function(a){var b=this;b.el.setZIndex(a);a+=10;if(b.floatingDescendants){a=Math.floor(b.floatingDescendants.setBase(a)/100)*100+10000}return a},doConstrain:function(a){var b=this,c=b.calculateConstrainedPosition(a,null,true);if(c){b.setPosition(c)}},toFront:function(c){var b=this,a=b.zIndexParent,d=b.preventFocusOnActivate;if(a&&b.bringParentToFront!==false){a.toFront(true)}if(!Ext.isDefined(c)){c=!b.focusOnToFront}if(c){b.preventFocusOnActivate=true}if(b.zIndexManager.bringToFront(b,c)){if(!c){b.focus(false,true)}}b.preventFocusOnActivate=d;return b},setActive:function(b,c){var a=this;if(b){if(a.el.shadow&&!a.maximized){a.el.enableShadow(true)}if(!a.preventFocusOnActivate){a.focus(false,true)}a.fireEvent("activate",a)}else{if(a.isWindow&&(c&&c.isWindow)&&a.hideShadowOnDeactivate){a.el.disableShadow()}a.fireEvent("deactivate",a)}},toBack:function(){this.zIndexManager.sendToBack(this);return this},center:function(){var a=this,b;if(a.isVisible()){b=a.getAlignToXY(a.container,"c-c");a.setPagePosition(b)}else{a.needsCenter=true}return a},onFloatShow:function(){if(this.needsCenter){this.center()}delete this.needsCenter},syncShadow:function(){if(this.floating){this.el.sync(true)}},fitContainer:function(c){var g=this,e=g.floatParent,b=e?e.getTargetEl():g.container,a=b.getViewSize(false),d=e||(b.dom!==document.body)?[0,0]:b.getXY();a.x=d[0];a.y=d[1];g.setBox(a,c)}});Ext.define("Ext.Component",{alias:["widget.component","widget.box"],extend:Ext.AbstractComponent,mixins:{floating:Ext.util.Floating},statics:{DIRECTION_TOP:"top",DIRECTION_RIGHT:"right",DIRECTION_BOTTOM:"bottom",DIRECTION_LEFT:"left",VERTICAL_DIRECTION_Re:/^(?:top|bottom)$/,INVALID_ID_CHARS_Re:/[\.,\s]/g},resizeHandles:"all",floating:false,defaultAlign:"tl-bl?",toFrontOnShow:true,hideMode:"display",offsetsCls:Ext.baseCSSPrefix+"hide-offsets",bubbleEvents:[],defaultComponentLayoutType:"autocomponent",constructor:function(a){var b=this;a=a||{};if(a.initialConfig){if(a.isAction){b.baseAction=a}a=a.initialConfig}else{if(a.tagName||a.dom||Ext.isString(a)){a={applyTo:a,id:a.id||a}}}b.callParent([a]);if(b.baseAction){b.baseAction.addComponent(b)}},initComponent:function(){var a=this;a.callParent();if(a.listeners){a.on(a.listeners);a.listeners=null}a.enableBubble(a.bubbleEvents)},afterRender:function(){var a=this;a.callParent();if(!(a.x&&a.y)&&(a.pageX||a.pageY)){a.setPagePosition(a.pageX,a.pageY)}},setAutoScroll:function(a){var b=this;b.autoScroll=!!a;if(b.rendered){b.getOverflowEl().setStyle(b.getOverflowStyle())}b.updateLayout();return b},setOverflowXY:function(b,a){var c=this,d=arguments.length;if(d){c.overflowX=b||"";if(d>1){c.overflowY=a||""}}if(c.rendered){c.getOverflowEl().setStyle(c.getOverflowStyle())}c.updateLayout();return c},beforeRender:function(){var b=this,c=b.floating,a;if(c){b.addCls(Ext.baseCSSPrefix+"layer");a=c.cls;if(a){b.addCls(a)}}return b.callParent()},afterComponentLayout:function(){this.callParent(arguments);if(this.floating){this.onAfterFloatLayout()}},makeFloating:function(a){this.mixins.floating.constructor.call(this,a)},wrapPrimaryEl:function(a){if(this.floating){this.makeFloating(a)}else{this.callParent(arguments)}},initResizable:function(a){var b=this;a=Ext.apply({target:b,dynamic:false,constrainTo:b.constrainTo||(b.floatParent?b.floatParent.getTargetEl():null),handles:b.resizeHandles},a);a.target=b;b.resizer=new Ext.resizer.Resizer(a)},getDragEl:function(){return this.el},initDraggable:function(){var c=this,a=(c.resizer&&c.resizer.el!==c.el)?c.resizerComponent=new Ext.Component({el:c.resizer.el,rendered:true,container:c.container}):c,b=Ext.applyIf({el:a.getDragEl(),constrainTo:(c.constrain||c.draggable.constrain)?(c.constrainTo||(c.floatParent?c.floatParent.getTargetEl():c.container)):undefined},c.draggable);if(c.constrain||c.constrainDelegate){b.constrain=c.constrain;b.constrainDelegate=c.constrainDelegate}c.dd=new Ext.util.ComponentDragger(a,b)},scrollBy:function(b,a,c){var d;if((d=this.getTargetEl())&&d.dom){d.scrollBy.apply(d,arguments)}},setLoading:function(c,d){var b=this,a={target:b};if(b.rendered){Ext.destroy(b.loadMask);b.loadMask=null;if(c!==false&&!b.collapsed){if(Ext.isObject(c)){Ext.apply(a,c)}else{if(Ext.isString(c)){a.msg=c}}if(d){Ext.applyIf(a,{useTargetEl:true})}b.loadMask=new Ext.LoadMask(a);b.loadMask.show()}}return b.loadMask},beforeSetPosition:function(){var b=this,c=b.callParent(arguments),a;if(c){a=b.adjustPosition(c.x,c.y);c.x=a.x;c.y=a.y}return c||null},afterSetPosition:function(b,a){this.onPosition(b,a);this.fireEvent("move",this,b,a)},showAt:function(a,d,b){var c=this;if(!c.rendered&&(c.autoRender||c.floating)){c.x=a;c.y=d;return c.show()}if(c.floating){c.setPosition(a,d,b)}else{c.setPagePosition(a,d,b)}c.show()},showBy:function(b,d,c){var a=this;if(a.floating&&b){a.show();if(a.rendered&&!a.hidden){a.alignTo(b,d||a.defaultAlign,c)}}return a},setPagePosition:function(a,g,b){var c=this,d,e;if(Ext.isArray(a)){g=a[1];a=a[0]}c.pageX=a;c.pageY=g;if(c.floating){if(c.isContainedFloater()){e=c.floatParent.getTargetEl().getViewRegion();if(Ext.isNumber(a)&&Ext.isNumber(e.left)){a-=e.left}if(Ext.isNumber(g)&&Ext.isNumber(e.top)){g-=e.top}}else{d=c.el.translateXY(a,g);a=d.x;g=d.y}c.setPosition(a,g,b)}else{d=c.el.translateXY(a,g);c.setPosition(d.x,d.y,b)}return c},isContainedFloater:function(){return(this.floating&&this.floatParent)},updateBox:function(a){this.setSize(a.width,a.height);this.setPagePosition(a.x,a.y);return this},getOuterSize:function(){var a=this.el;return{width:a.getWidth()+a.getMargin("lr"),height:a.getHeight()+a.getMargin("tb")}},adjustPosition:function(a,d){var b=this,c;if(b.isContainedFloater()){c=b.floatParent.getTargetEl().getViewRegion();a+=c.left;d+=c.top}return{x:a,y:d}},getPosition:function(a){var b=this,d,c=b.isContainedFloater(),e;if((a===true)&&!c){return[b.getLocalX(),b.getLocalY()]}d=b.getXY();if((a===true)&&c){e=b.floatParent.getTargetEl().getViewRegion();d[0]-=e.left;d[1]-=e.top}return d},getId:function(){var a=this,b;if(!a.id){b=a.getXType();if(b){b=b.replace(Ext.Component.INVALID_ID_CHARS_Re,"-")}else{b=Ext.name.toLowerCase()+"-comp"}a.id=b+"-"+a.getAutoId()}return a.id},show:function(d,a,b){var c=this,e=c.rendered;if(c.hierarchicallyHidden||(c.floating&&!e&&c.isHierarchicallyHidden())){if(!e){c.initHierarchyEvents()}if(arguments.length>1){arguments[0]=null;c.pendingShow=arguments}else{c.pendingShow=true}}else{if(e&&c.isVisible()){if(c.toFrontOnShow&&c.floating){c.toFront()}}else{if(c.fireEvent("beforeshow",c)!==false){c.hidden=false;delete this.getHierarchyState().hidden;if(!e&&(c.autoRender||c.floating)){c.doAutoRender();e=c.rendered}if(e){c.beforeShow();c.onShow.apply(c,arguments);c.afterShow.apply(c,arguments)}}else{c.onShowVeto()}}}return c},onShowVeto:Ext.emptyFn,beforeShow:Ext.emptyFn,onShow:function(){var a=this;a.el.show();a.callParent(arguments);if(a.floating){if(a.maximized){a.fitContainer()}else{if(a.constrain){a.doConstrain()}}}},getAnimateTarget:function(a){a=a||this.animateTarget;if(a){a=a.isComponent?a.getEl():Ext.get(a)}return a||null},afterShow:function(h,b,e){var g=this,i=g.el,a,c,d;h=g.getAnimateTarget(h);if(!g.ghost){h=null}if(h){c={x:i.getX(),y:i.getY(),width:i.dom.offsetWidth,height:i.dom.offsetHeight};a={x:h.getX(),y:h.getY(),width:h.dom.offsetWidth,height:h.dom.offsetHeight};i.addCls(g.offsetsCls);d=g.ghost();d.el.stopAnimation();d.setX(-10000);g.ghostBox=c;d.el.animate({from:a,to:c,listeners:{afteranimate:function(){delete d.componentLayout.lastComponentSize;g.unghost();delete g.ghostBox;i.removeCls(g.offsetsCls);g.onShowComplete(b,e)}}})}else{g.onShowComplete(b,e)}g.fireHierarchyEvent("show")},onShowComplete:function(a,b){var c=this;if(c.floating){c.toFront();c.onFloatShow()}Ext.callback(a,b||c);c.fireEvent("show",c);delete c.hiddenByLayout},hide:function(e,b,c){var d=this,a;if(d.pendingShow){delete d.pendingShow}if(!(d.rendered&&!d.isVisible())){a=(d.fireEvent("beforehide",d)!==false);if(d.hierarchicallyHidden||a){d.hidden=true;d.getHierarchyState().hidden=true;if(d.rendered){d.onHide.apply(d,arguments)}}}return d},onHide:function(i,a,e){var g=this,c,d,b,h=Ext.Element.getActiveElement();if(h===g.el||g.el.contains(h)){Ext.fly(h).blur()}i=g.getAnimateTarget(i);if(!g.ghost){i=null}if(i){b={x:i.getX(),y:i.getY(),width:i.dom.offsetWidth,height:i.dom.offsetHeight};c=g.ghost();c.el.stopAnimation();d=g.getSize();c.el.animate({to:b,listeners:{afteranimate:function(){delete c.componentLayout.lastComponentSize;c.el.hide();c.el.setSize(d);g.afterHide(a,e)}}})}g.el.hide();if(!i){g.afterHide(a,e)}},afterHide:function(a,b){var c=this;delete c.hiddenByLayout;Ext.AbstractComponent.prototype.onHide.call(c);Ext.callback(a,b||c);c.fireEvent("hide",c);c.fireHierarchyEvent("hide")},onDestroy:function(){var a=this;if(a.rendered){Ext.destroy(a.dd,a.resizer,a.proxy,a.proxyWrap,a.resizerComponent)}delete a.focusTask;a.callParent()},deleteMembers:function(){var b=arguments,a=b.length,c=0;for(;c<a;++c){delete this[b[c]]}},focus:function(e,c){var d=this,a,g,b;if(c){if(!d.focusTask){d.self.prototype.focusTask=new Ext.util.DelayedTask(d.focus)}d.focusTask.delay(Ext.isNumber(c)?c:10,null,d,[e,false]);return d}if(d.focusTask){d.focusTask.cancel()}if(d.rendered&&!d.isDestroyed&&d.isVisible(true)&&(a=d.getFocusEl())){if(a.isComponent){return a.focus(e,c)}if((g=a.dom)){if(a.needsTabIndex()){g.tabIndex=-1}if(d.floating){b=d.container.dom.scrollTop}a.focus();if(e===true){g.select()}}if(d.floating){d.toFront(true);if(b!==undefined){d.container.dom.scrollTop=b}}}return d},cancelFocus:function(){var a=this.focusTask;if(a){a.cancel()}},blur:function(){var a;if(this.rendered&&(a=this.getFocusEl())){a.blur()}return this},getEl:function(){return this.el},getResizeEl:function(){return this.el},getPositionEl:function(){return this.el},getActionEl:function(){return this.el},getVisibilityEl:function(){return this.el},getRefOwner:function(){return this.ownerCt||this.floatParent},getBubbleTarget:function(){return this.getRefOwner()},getContentTarget:function(){return this.el},cloneConfig:function(c){c=c||{};var d=c.id||Ext.id(),a=Ext.applyIf(c,this.initialConfig),b;a.id=d;b=Ext.getClass(this);return new b(a)},getXType:function(){return this.self.xtype},findParentBy:function(a){var b;for(b=this.getBubbleTarget();b&&!a(b,this);b=b.getBubbleTarget()){}return b||null},findParentByType:function(a){return Ext.isFunction(a)?this.findParentBy(function(b){return b.constructor===a}):this.up(a)},bubble:function(c,b,a){var d=this;while(d){if(c.apply(b||d,a||[d])===false){break}d=d.getBubbleTarget()}return this},getProxy:function(){var a=this,b;if(!a.proxy){b=Ext.getBody();a.proxy=a.el.createProxy(Ext.baseCSSPrefix+"proxy-el",b,true)}return a.proxy},fireHierarchyEvent:function(a){this.hierarchyEventSource.fireEvent(a,this)},onAdded:function(){this.callParent(arguments);if(this.hierarchyEventSource.hasListeners.added){this.fireHierarchyEvent("added")}}},function(){this.hierarchyEventSource=this.prototype.hierarchyEventSource=new Ext.util.Observable({events:{hide:true,show:true,collapse:true,expand:true,added:true}})});Ext.define("Ext.ElementLoader",{mixins:{observable:Ext.util.Observable},statics:{Renderer:{Html:function(a,b,c){a.getTarget().update(b.responseText,c.scripts===true);return true}}},url:null,params:null,baseParams:null,autoLoad:false,target:null,loadMask:false,ajaxOptions:null,scripts:false,isLoader:true,constructor:function(b){var c=this,a;b=b||{};Ext.apply(c,b);c.setTarget(c.target);c.addEvents("beforeload","exception","load");c.mixins.observable.constructor.call(c);if(c.autoLoad){a=c.autoLoad;if(a===true){a={}}c.load(a)}},setTarget:function(b){var a=this;b=Ext.get(b);if(a.target&&a.target!=b){a.abort()}a.target=b},getTarget:function(){return this.target||null},abort:function(){var a=this.active;if(a!==undefined){Ext.Ajax.abort(a.request);if(a.mask){this.removeMask()}delete this.active}},removeMask:function(){this.target.unmask()},addMask:function(a){this.target.mask(a===true?null:a)},load:function(c){c=Ext.apply({},c);var e=this,a=Ext.isDefined(c.loadMask)?c.loadMask:e.loadMask,g=Ext.apply({},c.params),b=Ext.apply({},c.ajaxOptions),h=c.callback||e.callback,d=c.scope||e.scope||e;Ext.applyIf(b,e.ajaxOptions);Ext.applyIf(c,b);Ext.applyIf(g,e.params);Ext.apply(g,e.baseParams);Ext.applyIf(c,{url:e.url});Ext.apply(c,{scope:e,params:g,callback:e.onComplete});if(e.fireEvent("beforeload",e,c)===false){return}if(a){e.addMask(a)}e.active={options:c,mask:a,scope:d,callback:h,success:c.success||e.success,failure:c.failure||e.failure,renderer:c.renderer||e.renderer,scripts:Ext.isDefined(c.scripts)?c.scripts:e.scripts};e.active.request=Ext.Ajax.request(c);e.setOptions(e.active,c)},setOptions:Ext.emptyFn,onComplete:function(b,g,a){var d=this,e=d.active,c;if(e){c=e.scope;if(g){g=d.getRenderer(e.renderer).call(d,d,a,e)!==false}if(g){Ext.callback(e.success,c,[d,a,b]);d.fireEvent("load",d,a,b)}else{Ext.callback(e.failure,c,[d,a,b]);d.fireEvent("exception",d,a,b)}Ext.callback(e.callback,c,[d,g,a,b]);if(e.mask){d.removeMask()}}delete d.active},getRenderer:function(a){if(Ext.isFunction(a)){return a}return this.statics().Renderer.Html},startAutoRefresh:function(a,b){var c=this;c.stopAutoRefresh();c.autoRefresh=setInterval(function(){c.load(b)},a)},stopAutoRefresh:function(){clearInterval(this.autoRefresh);delete this.autoRefresh},isAutoRefreshing:function(){return Ext.isDefined(this.autoRefresh)},destroy:function(){var a=this;a.stopAutoRefresh();delete a.target;a.abort();a.clearListeners()}});Ext.define("Ext.ComponentLoader",{extend:Ext.ElementLoader,statics:{Renderer:{Data:function(a,b,d){var g=true;try{a.getTarget().update(Ext.decode(b.responseText))}catch(c){g=false}return g},Component:function(a,c,h){var i=true,g=a.getTarget(),b=[];try{b=Ext.decode(c.responseText)}catch(d){i=false}if(i){g.suspendLayouts();if(h.removeAll){g.removeAll()}g.add(b);g.resumeLayouts(true)}return i}}},target:null,loadMask:false,renderer:"html",setTarget:function(b){var a=this;if(Ext.isString(b)){b=Ext.getCmp(b)}if(a.target&&a.target!=b){a.abort()}a.target=b},removeMask:function(){this.target.setLoading(false)},addMask:function(a){this.target.setLoading(a)},setOptions:function(b,a){b.removeAll=Ext.isDefined(a.removeAll)?a.removeAll:this.removeAll},getRenderer:function(b){if(Ext.isFunction(b)){return b}var a=this.statics().Renderer;switch(b){case"component":return a.Component;case"data":return a.Data;default:return Ext.ElementLoader.Renderer.Html}}});Ext.define("Ext.layout.SizeModel",{constructor:function(c){var e=this,d=e.self,a=d.sizeModelsArray,b;Ext.apply(e,c);e[b=e.name]=true;e.fixed=!(e.auto=e.natural||e.shrinkWrap);a[e.ordinal=a.length]=d[b]=d.sizeModels[b]=e},statics:{sizeModelsArray:[],sizeModels:{}},calculated:false,configured:false,constrainedMax:false,constrainedMin:false,natural:false,shrinkWrap:false,calculatedFromConfigured:false,calculatedFromNatural:false,calculatedFromShrinkWrap:false,names:null},function(){var e=this,a=e.sizeModelsArray,c,b,h,g,d;new e({name:"calculated"});new e({name:"configured",names:{width:"width",height:"height"}});new e({name:"natural"});new e({name:"shrinkWrap"});new e({name:"calculatedFromConfigured",configured:true,names:{width:"width",height:"height"}});new e({name:"calculatedFromNatural",natural:true});new e({name:"calculatedFromShrinkWrap",shrinkWrap:true});new e({name:"constrainedMax",configured:true,constrained:true,names:{width:"maxWidth",height:"maxHeight"}});new e({name:"constrainedMin",configured:true,constrained:true,names:{width:"minWidth",height:"minHeight"}});new e({name:"constrainedDock",configured:true,constrained:true,constrainedByMin:true,names:{width:"dockConstrainedWidth",height:"dockConstrainedHeight"}});for(c=0,h=a.length;c<h;++c){d=a[c];d.pairsByHeightOrdinal=g=[];for(b=0;b<h;++b){g.push({width:d,height:a[b]})}}});Ext.define("Ext.layout.Layout",{isLayout:true,initialized:false,running:false,autoSizePolicy:{readsWidth:1,readsHeight:1,setsWidth:0,setsHeight:0},statics:{layoutsByType:{},create:function(g,e){var k=Ext.ClassManager,c=this.layoutsByType,d,h,b,a,i,j;if(!g||typeof g==="string"){i=g||e;b={}}else{if(g.isLayout){return g}else{b=g;i=g.type||e}}if(!(a=c[i])){d="layout."+i;h=k.getNameByAlias(d);if(!h){j=true}a=k.get(h);if(j||!a){return k.instantiateByAlias(d,b||{})}c[i]=a}return new a(b)}},constructor:function(a){var b=this;b.id=Ext.id(null,b.type+"-");Ext.apply(b,a);b.layoutCount=0},beginLayout:Ext.emptyFn,beginLayoutCycle:function(c){var b=this,a=b.context,d;if(b.lastWidthModel!=c.widthModel){if(b.lastWidthModel){d=true}b.lastWidthModel=c.widthModel}if(b.lastHeightModel!=c.heightModel){if(b.lastWidthModel){d=true}b.lastHeightModel=c.heightModel}if(d){(a=c.context).clearTriggers(b,false);a.clearTriggers(b,true);b.triggerCount=0}},finishedLayout:function(a){this.lastWidthModel=a.widthModel;this.lastHeightModel=a.heightModel;this.ownerContext=null},redoLayout:Ext.emptyFn,undoLayout:Ext.emptyFn,getAnimatePolicy:function(){return this.animatePolicy},getItemSizePolicy:function(a){return this.autoSizePolicy},isItemBoxParent:function(a){return false},isItemLayoutRoot:function(d){var c=d.getSizeModel(),b=c.width,a=c.height;if(!d.componentLayout.lastComponentSize&&(b.calculated||a.calculated)){return false}return !b.shrinkWrap&&!a.shrinkWrap},isItemShrinkWrap:function(a){return a.shrinkWrap},isRunning:function(){return !!this.ownerContext},getItemsRenderTree:function(d,b){var h=d.length,e,g,c,a;if(h){a=[];for(e=0;e<h;++e){g=d[e];if(!g.rendered){if(b&&(b[g.id]!==undefined)){c=b[g.id]}else{this.configureItem(g);c=g.getRenderTree();if(b){b[g.id]=c}}if(c){a.push(c)}}}}return a},finishRender:Ext.emptyFn,finishRenderItems:function(e,a){var d=a.length,b,c;for(b=0;b<d;b++){c=a[b];if(c.rendering){c.finishRender(b);this.afterRenderItem(c)}}},renderChildren:function(){var b=this,a=b.getLayoutItems(),c=b.getRenderTarget();b.renderItems(a,c)},renderItems:function(a,g){var e=this,d=a.length,b=0,c;if(d){Ext.suspendLayouts();for(;b<d;b++){c=a[b];if(c&&!c.rendered){e.renderItem(c,g,b)}else{if(!e.isValidParent(c,g,b)){e.moveItem(c,g,b)}else{e.configureItem(c)}}}Ext.resumeLayouts(true)}},isValidParent:function(g,h,b){var c=g.el?g.el.dom:Ext.getDom(g),e=(h&&h.dom)||h,a=c.parentNode,d;if(a){d=a.className;if(d&&d.indexOf(Ext.baseCSSPrefix+"resizable-wrap")!==-1){c=c.parentNode}}if(c&&e){if(typeof b=="number"){b=this.getPositionOffset(b);return c===e.childNodes[b]}return c.parentNode===e}return false},getPositionOffset:function(a){return a},configureItem:function(a){a.ownerLayout=this},renderItem:function(c,d,a){var b=this;if(!c.rendered){b.configureItem(c);c.render(d,a);b.afterRenderItem(c)}},moveItem:function(b,c,a){c=c.dom||c;if(typeof a=="number"){a=c.childNodes[a]}c.insertBefore(b.el.dom,a||null);b.container=Ext.get(c);this.configureItem(b)},onContentChange:function(){this.owner.updateLayout();return true},initLayout:function(){this.initialized=true},setOwner:function(a){this.owner=a},getLayoutItems:function(){return[]},afterRenderItem:Ext.emptyFn,onAdd:Ext.emptyFn,onRemove:Ext.emptyFn,onDestroy:Ext.emptyFn,afterRemove:function(e){var d=this,c=e.el,b=d.owner,a;if(e.rendered){a=[].concat(d.itemCls||[]);if(b.itemCls){a=Ext.Array.push(a,b.itemCls)}if(a.length){c.removeCls(a)}}delete e.ownerLayout},destroy:function(){var a=this,b;if(a.targetCls){b=a.getTarget();if(b){b.removeCls(a.targetCls)}}a.onDestroy()},sortWeightedItems:function(a,d){for(var b=0,c=a.length;b<c;++b){a[b].$i=b}Ext.Array.sort(a,function(g,e){var h=e.weight-g.weight;if(!h){h=g.$i-e.$i;if(g[d]){h=-h}}return h});for(b=0;b<c;++b){delete a[b].$i}}},function(){var a=this;a.prototype.sizeModels=a.sizeModels=Ext.layout.SizeModel.sizeModels});Ext.define("Ext.layout.container.Container",{alias:["layout.container"],extend:Ext.layout.Layout,alternateClassName:"Ext.layout.ContainerLayout",mixins:{elementCt:Ext.util.ElementContainer},type:"container",beginCollapse:Ext.emptyFn,beginExpand:Ext.emptyFn,animatePolicy:null,childEls:["overflowPadderEl"],renderTpl:["{%this.renderBody(out,values)%}"],usesContainerHeight:true,usesContainerWidth:true,usesHeight:true,usesWidth:true,constructor:function(){this.callParent(arguments);this.mixins.elementCt.constructor.call(this)},destroy:function(){this.callParent();this.mixins.elementCt.destroy.call(this)},beginLayout:function(a){this.callParent(arguments);a.targetContext=a.paddingContext=a.getEl("getTarget",this);this.cacheChildItems(a)},beginLayoutCycle:function(c,a){var b=this;b.callParent(arguments);if(a){if(b.usesContainerHeight){++c.consumersContainerHeight}if(b.usesContainerWidth){++c.consumersContainerWidth}}},cacheChildItems:function(e){var c=e.context,g=[],a=this.getVisibleItems(),d=a.length,b;e.childItems=g;e.visibleItems=a;for(b=0;b<d;++b){g.push(c.getCmp(a[b]))}},cacheElements:function(){var a=this.owner;this.applyChildEls(a.el,a.id)},configureItem:function(c){var b=this,d=b.itemCls,a=b.owner.itemCls,e;c.ownerLayout=b;if(d){e=typeof d==="string"?[d]:d}if(a){e=Ext.Array.push(e||[],a)}if(e){c.addCls(e)}},doRenderBody:function(a,b){this.renderItems(a,b);this.renderContent(a,b)},doRenderContainer:function(b,e){var c=e.$comp.layout,a=c.getRenderTpl(),d=c.getRenderData();a.applyOut(d,b)},doRenderItems:function(b,d){var c=d.$layout,a=c.getRenderTree();if(a){Ext.DomHelper.generateMarkup(a,b)}},finishRender:function(){var b=this,c,a;b.callParent();b.cacheElements();c=b.getRenderTarget();a=b.getLayoutItems();b.finishRenderItems(c,a)},notifyOwner:function(){this.owner.afterLayout(this)},getContainerSize:function(b,g){var c=b.targetContext,e=c.getFrameInfo(),j=b.paddingContext.getPaddingInfo(),i=0,k=0,d,h,a,l;if(!b.widthModel.shrinkWrap){++k;a=g?c.getDomProp("width"):c.getProp("width");d=(typeof a=="number");if(d){++i;a-=e.width+j.width;if(a<0){a=0}}}if(!b.heightModel.shrinkWrap){++k;l=g?c.getDomProp("height"):c.getProp("height");h=(typeof l=="number");if(h){++i;l-=e.height+j.height;if(l<0){l=0}}}return{width:a,height:l,needed:k,got:i,gotAll:i==k,gotWidth:d,gotHeight:h}},getPositionOffset:function(a){if(!this.createsInnerCt){var b=this.owner.itemNodeOffset;if(b){a+=b}}return a},getLayoutItems:function(){var a=this.owner,b=a&&a.items;return(b&&b.items)||[]},getRenderData:function(){var a=this.owner;return{$comp:a,$layout:this,ownerId:a.id}},getRenderedItems:function(){var e=this,h=e.getRenderTarget(),a=e.getLayoutItems(),d=a.length,g=[],b,c;for(b=0;b<d;b++){c=a[b];if(c.rendered&&e.isValidParent(c,h,b)){g.push(c)}}return g},getRenderTarget:function(){return this.owner.getTargetEl()},getElementTarget:function(){return this.getRenderTarget()},getRenderTpl:function(){var a=this,b=Ext.XTemplate.getTpl(this,"renderTpl");if(!b.renderContent){a.owner.setupRenderTpl(b)}return b},getRenderTree:function(){var a,c=this.owner.items,d,b={};do{d=c.generation;a=this.getItemsRenderTree(this.getLayoutItems(),b)}while(c.generation!==d);return a},getScrollbarsNeeded:function(c,i,b,h){var a=Ext.getScrollbarSize(),e=typeof c=="number",j=typeof i=="number",g=0,d=0;if(!a.width){return 0}if(j&&i<h){d=2;c-=a.width}if(e&&c<b){g=1;if(!d&&j){i-=a.height;if(i<h){d=2}}}return d+g},getTarget:function(){return this.owner.getTargetEl()},getVisibleItems:function(){var g=this.getRenderTarget(),b=this.getLayoutItems(),e=b.length,a=[],c,d;for(c=0;c<e;c++){d=b[c];if(d.rendered&&this.isValidParent(d,g,c)&&d.hidden!==true){a.push(d)}}return a},setupRenderTpl:function(b){var a=this;b.renderBody=a.doRenderBody;b.renderContainer=a.doRenderContainer;b.renderItems=a.doRenderItems},getContentTarget:function(){return this.owner.getDefaultContentTarget()}});Ext.define("Ext.layout.container.Auto",{alias:["layout.auto","layout.autocontainer"],extend:Ext.layout.container.Container,type:"autocontainer",childEls:["outerCt","innerCt","clearEl"],reserveScrollbar:false,managePadding:true,manageOverflow:false,lastOverflowAdjust:{width:0,height:0},renderTpl:["{% if (!(Ext.isIEQuirks || Ext.isIE7m)) { %}",'<span id="{ownerId}-outerCt" style="display:table;">','<div id="{ownerId}-innerCt" style="display:table-cell;height:100%;','vertical-align:top;{%this.renderPadding(out, values)%}" class="{innerCtCls}">',"{%this.renderBody(out,values)%}","</div>","</span>","{% } else if (values.shrinkWrapWidth) { %}",'<table id="{ownerId}-outerCt" class="'+Ext.baseCSSPrefix+'table-plain">',"<tr>",'<td id="{ownerId}-innerCt" style="vertical-align:top;padding:0;','{%this.renderPadding(out, values)%}" class="{innerCtCls}">',"{%this.renderBody(out,values)%}",'<div id="{ownerId}-clearEl" class="',Ext.baseCSSPrefix,'clear"','role="presentation"></div>',"</td>","</tr>","</table>","{% } else { %}",'<div id="{ownerId}-outerCt" style="zoom:1;{%this.renderPadding(out, values)%}">','<div id="{ownerId}-innerCt" style="zoom:1;height:100%;" class="{innerCtCls}">',"{%this.renderBody(out,values)%}",'<div id="{ownerId}-clearEl" class="',Ext.baseCSSPrefix,'clear"','role="presentation"></div>',"</div>","</div>","{% values.$layout.isShrinkWrapTpl = false %}","{% } %}"],tableTpl:['<table id="{ownerId}-outerCt" class="'+Ext.baseCSSPrefix+'table-plain">',"<tr>",'<td id="{ownerId}-innerCt" style="vertical-align:top;padding:0;','{%this.renderPadding(out, values)%}" class="{innerCtCls}">',"</td>","</tr>","</table>"],isShrinkWrapTpl:true,beginLayout:function(e){var d=this,a,b,c,g;d.callParent(arguments);d.initContextItems(e);if(!d.isShrinkWrapTpl){if(e.widthModel.shrinkWrap){g=true}if(Ext.isStrict&&Ext.isIE7){c=d.getOverflowXStyle(e);if((c==="auto"||c==="scroll")&&e.paddingContext.getPaddingInfo().right){g=true}}if(g){d.insertTableCt(e)}}if(!d.isShrinkWrapTpl&&Ext.isIE7&&Ext.isStrict&&!d.clearElHasPadding){a=e.paddingContext.getPaddingInfo().bottom;b=d.getOverflowYStyle(e);if(a&&(b==="auto"||b==="scroll")){d.clearEl.setStyle("height",a);d.clearElHasPadding=true}}},beforeLayoutCycle:function(c){var a=this.owner,d=a.hierarchyState,b=a.hierarchyStateInner;if(!d||d.invalid){d=a.getHierarchyState();b=a.hierarchyStateInner}if(c.widthModel.shrinkWrap&&this.isShrinkWrapTpl){b.inShrinkWrapTable=true}else{delete b.inShrinkWrapTable}},beginLayoutCycle:function(e){var k=this,b=k.outerCt,j=k.lastOuterCtWidth||"",i=k.lastOuterCtHeight||"",l=k.lastOuterCtTableLayout||"",m,g,h,n,c,a,d;k.callParent(arguments);h=n=c="";if(!e.widthModel.shrinkWrap&&k.isShrinkWrapTpl){if(Ext.isIE7m&&Ext.isStrict){g=k.getOverflowYStyle(e);if(g==="auto"||g==="scroll"){a=true}}if(!a){h="100%"}d=k.owner.hierarchyStateInner;m=k.getOverflowXStyle(e);c=(d.inShrinkWrapTable||m==="auto"||m==="scroll")?"":"fixed"}if(!e.heightModel.shrinkWrap&&!Ext.supports.PercentageHeightOverflowBug){n="100%"}if((h!==j)||k.hasOuterCtPxWidth){b.setStyle("width",h);k.lastOuterCtWidth=h;k.hasOuterCtPxWidth=false}if(c!==l){b.setStyle("table-layout",c);k.lastOuterCtTableLayout=c}if((n!==i)||k.hasOuterCtPxHeight){b.setStyle("height",n);k.lastOuterCtHeight=n;k.hasOuterCtPxHeight=false}if(k.hasInnerCtPxHeight){k.innerCt.setStyle("height","");k.hasInnerCtPxHeight=false}e.state.overflowAdjust=k.lastOverflowAdjust},calculate:function(c){var a=this,b=c.state,e=a.getContainerSize(c,true),d=b.calculatedItems||(b.calculatedItems=a.calculateItems?a.calculateItems(c,e):true);a.setCtSizeIfNeeded(c,e);if(d&&c.hasDomProp("containerChildrenSizeDone")){a.calculateContentSize(c);if(e.gotAll){if(a.manageOverflow&&!c.state.secondPass&&!a.reserveScrollbar){a.calculateOverflow(c,e)}return}}a.done=false},calculateContentSize:function(g){var e=this,a=((g.widthModel.shrinkWrap?1:0)|(g.heightModel.shrinkWrap?2:0)),c=(a&1)||undefined,h=(a&2)||undefined,d=0,b=g.props;if(c){if(isNaN(b.contentWidth)){++d}else{c=undefined}}if(h){if(isNaN(b.contentHeight)){++d}else{h=undefined}}if(d){if(c&&!g.setContentWidth(e.measureContentWidth(g))){e.done=false}if(h&&!g.setContentHeight(e.measureContentHeight(g))){e.done=false}}},calculateOverflow:function(c){var h=this,b,j,a,g,e,d,i;e=(h.getOverflowXStyle(c)==="auto");d=(h.getOverflowYStyle(c)==="auto");if(e||d){a=Ext.getScrollbarSize();i=c.overflowContext.el.dom;g=0;if(i.scrollWidth>i.clientWidth){g|=1}if(i.scrollHeight>i.clientHeight){g|=2}b=(d&&(g&2))?a.width:0;j=(e&&(g&1))?a.height:0;if(b!==h.lastOverflowAdjust.width||j!==h.lastOverflowAdjust.height){h.done=false;c.invalidate({state:{overflowAdjust:{width:b,height:j},overflowState:g,secondPass:true}})}}},completeLayout:function(a){this.lastOverflowAdjust=a.state.overflowAdjust},doRenderPadding:function(b,d){var c=d.$layout,a=d.$layout.owner,e=a[a.contentPaddingProperty];if(c.managePadding&&e){b.push("padding:",Ext.Element.unitizeBox(e))}},finishedLayout:function(b){var a=this.innerCt;this.callParent(arguments);if(Ext.isIEQuirks||Ext.isIE8m){a.repaint()}if(Ext.isOpera){a.setStyle("position","relative");a.dom.scrollWidth;a.setStyle("position","")}},getContainerSize:function(b,c){var a=this.callParent(arguments),d=b.state.overflowAdjust;if(d){a.width-=d.width;a.height-=d.height}return a},getRenderData:function(){var a=this.owner,b=this.callParent();if((Ext.isIEQuirks||Ext.isIE7m)&&((a.shrinkWrap&1)||(a.floating&&!a.width))){b.shrinkWrapWidth=true}return b},getRenderTarget:function(){return this.innerCt},getElementTarget:function(){return this.innerCt},getOverflowXStyle:function(a){return a.overflowXStyle||(a.overflowXStyle=this.owner.scrollFlags.overflowX||a.overflowContext.getStyle("overflow-x"))},getOverflowYStyle:function(a){return a.overflowYStyle||(a.overflowYStyle=this.owner.scrollFlags.overflowY||a.overflowContext.getStyle("overflow-y"))},initContextItems:function(c){var b=this,d=c.target,a=b.owner.customOverflowEl;c.outerCtContext=c.getEl("outerCt",b);c.innerCtContext=c.getEl("innerCt",b);if(a){c.overflowContext=c.getEl(a)}else{c.overflowContext=c.targetContext}if(d[d.contentPaddingProperty]!==undefined){c.paddingContext=b.isShrinkWrapTpl?c.innerCtContext:c.outerCtContext}},initLayout:function(){var c=this,b=Ext.getScrollbarSize().width,a=c.owner;c.callParent();if(b&&c.manageOverflow&&!c.hasOwnProperty("lastOverflowAdjust")){if(a.autoScroll||c.reserveScrollbar){c.lastOverflowAdjust={width:b,height:0}}}},insertTableCt:function(b){var h=this,a=h.owner,c=0,e,g,k,d,j;e=Ext.XTemplate.getTpl(this,"tableTpl");e.renderPadding=h.doRenderPadding;h.outerCt.dom.removeChild(h.innerCt.dom);g=document.createDocumentFragment();k=h.innerCt.dom.childNodes;d=k.length;for(;c<d;c++){g.appendChild(k[0])}j=h.getTarget();j.dom.innerHTML=e.apply({$layout:h,ownerId:h.owner.id});j.down("td").dom.appendChild(g);h.applyChildEls(a.el,a.id);h.isShrinkWrapTpl=true;b.removeEl(h.outerCt);b.removeEl(h.innerCt);h.initContextItems(b)},measureContentHeight:function(b){var a=this.outerCt.getHeight(),c=b.target;if(this.managePadding&&(c[c.contentPaddingProperty]===undefined)){a+=b.targetContext.getPaddingInfo().height}return a},measureContentWidth:function(b){var a=this.outerCt.getWidth(),c=b.target;if(this.managePadding&&(c[c.contentPaddingProperty]===undefined)){a+=b.targetContext.getPaddingInfo().width}return a},setCtSizeIfNeeded:function(d,n){var s=this,l=n.width,i=n.height,g=d.paddingContext.getPaddingInfo(),j=s.getTarget(),e=s.getOverflowXStyle(d),k=s.getOverflowYStyle(d),o=(e==="auto"||e==="scroll"),m=(k==="auto"||k==="scroll"),p=Ext.getScrollbarSize(),q=s.isShrinkWrapTpl,b=s.manageOverflow,a,r,h,c;if(l&&!d.widthModel.shrinkWrap&&((Ext.isIE7m&&Ext.isStrict&&q&&m)||(Ext.isIEQuirks&&!q&&!o))){if(!b){if(m&&(j.dom.scrollHeight>j.dom.clientHeight)){l-=p.width}}d.outerCtContext.setProp("width",l+g.width);s.hasOuterCtPxWidth=true}if(i&&!d.heightModel.shrinkWrap){if(Ext.supports.PercentageHeightOverflowBug){r=true}if(((Ext.isIE8&&Ext.isStrict)||Ext.isIE7m&&Ext.isStrict&&q)){h=true;c=!Ext.isIE8}if((r||h)&&o&&(j.dom.scrollWidth>j.dom.clientWidth)){i-=p.height}if(r){d.outerCtContext.setProp("height",i+g.height);s.hasOuterCtPxHeight=true}if(h){if(c){i+=g.height}d.innerCtContext.setProp("height",i);s.hasInnerCtPxHeight=true}}if(Ext.isIE7&&Ext.isStrict&&!q&&(k==="auto")){a=(e==="auto")?"overflow-x":"overflow-y";j.setStyle(a,"hidden");j.setStyle(a,"auto")}},setupRenderTpl:function(a){this.callParent(arguments);a.renderPadding=this.doRenderPadding},getContentTarget:function(){return this.innerCt}});Ext.define("Ext.ZIndexManager",{alternateClassName:"Ext.WindowGroup",statics:{zBase:9000},constructor:function(a){var b=this;b.list={};b.zIndexStack=[];b.front=null;if(a){if(a.isContainer){a.on("resize",b._onContainerResize,b);b.zseed=Ext.Number.from(b.rendered?a.getEl().getStyle("zIndex"):undefined,b.getNextZSeed());b.targetEl=a.getTargetEl();b.container=a}else{Ext.EventManager.onWindowResize(b._onContainerResize,b);b.zseed=b.getNextZSeed();b.targetEl=Ext.get(a)}}else{Ext.EventManager.onWindowResize(b._onContainerResize,b);b.zseed=b.getNextZSeed();Ext.onDocumentReady(function(){b.targetEl=Ext.getBody()})}},getNextZSeed:function(){return(Ext.ZIndexManager.zBase+=10000)},setBase:function(b){this.zseed=b;var a=this.assignZIndices();this._activateLast();return a},assignZIndices:function(){var c=this.zIndexStack,b=c.length,e=0,h=this.zseed,d,g;for(;e<b;e++){d=c[e];if(d&&!d.hidden){h=d.setZIndex(h);if(d.modal){g=d}}}if(g){this._showModalMask(g)}return h},_setActiveChild:function(b,a){var c=this.front,d=b.preventFocusOnActivate;if(b!==c){if(c&&!c.destroying){c.setActive(false,b)}this.front=b;if(b&&b!=a){b.preventFocusOnActivate=b.preventFocusOnActivate||a&&(a.preventFocusOnActivate||!a.focusOnToFront);b.setActive(true);if(b.modal){this._showModalMask(b)}b.preventFocusOnActivate=d}}},onComponentHide:function(a){this._activateLast()},_activateLast:function(){var d=this,a=d.zIndexStack,c=a.length-1,b;for(;c>=0&&a[c].hidden;--c){}if((b=a[c])){d._setActiveChild(b,d.front);if(b.modal){return}}else{if(d.front&&!d.front.destroying){d.front.setActive(false)}d.front=null}for(;c>=0;--c){b=a[c];if(b.isVisible()&&b.modal){d._showModalMask(b);return}}d._hideModalMask()},_showModalMask:function(b){var d=this,h=b.el.getStyle("zIndex")-4,c=b.floatParent?b.floatParent.getTargetEl():b.container,a=d.mask,g=d.maskShim,e;if(!a){if(Ext.isIE6){g=d.maskShim=Ext.getBody().createChild({tag:"iframe",cls:Ext.baseCSSPrefix+"shim "+Ext.baseCSSPrefix+"mask-shim"});g.setVisibilityMode(Ext.Element.DISPLAY)}a=d.mask=Ext.getBody().createChild({cls:Ext.baseCSSPrefix+"mask",style:"height:0;width:0"});a.setVisibilityMode(Ext.Element.DISPLAY);a.on("click",d._onMaskClick,d)}a.maskTarget=c;e=d.getMaskBox();if(g){g.setStyle("zIndex",h);g.show();g.setBox(e)}a.setStyle("zIndex",h);a.show();a.setBox(e)},_hideModalMask:function(){var b=this.mask,a=this.maskShim;if(b&&b.isVisible()){b.maskTarget=undefined;b.hide();if(a){a.hide()}}},_onMaskClick:function(){if(this.front){this.front.focus()}},getMaskBox:function(){var a=this.mask.maskTarget;if(a.dom===document.body){return{height:Math.max(document.body.scrollHeight,Ext.dom.Element.getDocumentHeight()),width:Math.max(document.body.scrollWidth,document.documentElement.clientWidth),x:0,y:0}}else{return a.getBox()}},_onContainerResize:function(){var c=this,b=c.mask,a=c.maskShim,d;if(b&&b.isVisible()){b.hide();if(a){a.hide()}d=c.getMaskBox();if(a){a.setSize(d);a.show()}b.setSize(d);b.show()}},register:function(b){var c=this,a=b.afterHide;if(b.zIndexManager){b.zIndexManager.unregister(b)}b.zIndexManager=c;c.list[b.id]=b;c.zIndexStack.push(b);b.afterHide=function(){a.apply(b,arguments);c.onComponentHide(b)}},unregister:function(a){var b=this,c=b.list;delete a.zIndexManager;if(c&&c[a.id]){delete c[a.id];delete a.afterHide;Ext.Array.remove(b.zIndexStack,a);b._activateLast()}},get:function(a){return a.isComponent?a:this.list[a]},bringToFront:function(b,d){var c=this,a=false,e=c.zIndexStack;b=c.get(b);if(b!==c.front){Ext.Array.remove(e,b);if(b.preventBringToFront){e.unshift(b)}else{e.push(b)}c.assignZIndices();if(!d){c._activateLast()}a=true;c.front=b;if(b.modal){c._showModalMask(b)}}return a},sendToBack:function(a){var b=this;a=b.get(a);Ext.Array.remove(b.zIndexStack,a);b.zIndexStack.unshift(a);b.assignZIndices();this._activateLast();return a},hideAll:function(){var b=this.list,a,c;for(c in b){if(b.hasOwnProperty(c)){a=b[c];if(a.isComponent&&a.isVisible()){a.hide()}}}},hide:function(){var d=0,b=this.zIndexStack,a=b.length,c;this.tempHidden=[];for(;d<a;d++){c=b[d];if(c.isVisible()){this.tempHidden.push(c);c.el.hide();c.hidden=true}}},show:function(){var c=0,d=this.tempHidden,a=d?d.length:0,b;for(;c<a;c++){b=d[c];b.el.show();b.hidden=false;b.setPosition(b.x,b.y)}delete this.tempHidden},getActive:function(){return this.front},getBy:function(g,e){var h=[],d=0,b=this.zIndexStack,a=b.length,c;for(;d<a;d++){c=b[d];if(g.call(e||c,c)!==false){h.push(c)}}return h},each:function(c,b){var d=this.list,e,a;for(e in d){if(d.hasOwnProperty(e)){a=d[e];if(a.isComponent&&c.call(b||a,a)===false){return}}}},eachBottomUp:function(g,e){var b=this.zIndexStack,d=0,a=b.length,c;for(;d<a;d++){c=b[d];if(c.isComponent&&g.call(e||c,c)===false){return}}},eachTopDown:function(e,d){var a=this.zIndexStack,c=a.length,b;for(;c-->0;){b=a[c];if(b.isComponent&&e.call(d||b,b)===false){return}}},destroy:function(){var b=this,c=b.list,a,d;for(d in c){if(c.hasOwnProperty(d)){a=c[d];if(a.isComponent){a.destroy()}}}delete b.zIndexStack;delete b.list;delete b.container;delete b.targetEl}},function(){Ext.WindowManager=Ext.WindowMgr=new this()});Ext.define("Ext.layout.component.Component",{extend:Ext.layout.Layout,type:"component",isComponentLayout:true,nullBox:{},usesContentHeight:true,usesContentWidth:true,usesHeight:true,usesWidth:true,beginLayoutCycle:function(c,p){var k=this,b=k.owner,e=c.ownerCtContext,g=c.heightModel,h=c.widthModel,i=b.el.dom===document.body,d=b.lastBox||k.nullBox,n=b.el.lastBox||k.nullBox,a=!i,m,o,l,j;k.callParent(arguments);if(p){if(k.usesContentWidth){++c.consumersContentWidth}if(k.usesContentHeight){++c.consumersContentHeight}if(k.usesWidth){++c.consumersWidth}if(k.usesHeight){++c.consumersHeight}if(e&&!e.hasRawContent){m=b.ownerLayout;if(m.usesWidth){++c.consumersWidth}if(m.usesHeight){++c.consumersHeight}}}if(h.configured){l=h.names.width;if(!i){a=p?b[l]!==n.width:h.constrained}c.setWidth(b[l],a)}else{if(c.isTopLevel){if(h.calculated){o=d.width;c.setWidth(o,o!=n.width)}o=d.x;c.setProp("x",o,o!=n.x)}}if(g.configured){j=g.names.height;if(!i){a=p?b[j]!==n.height:g.constrained}c.setHeight(b[j],a)}else{if(c.isTopLevel){if(g.calculated){o=d.height;c.setHeight(o,o!=n.height)}o=d.y;c.setProp("y",o,o!=n.y)}}},finishedLayout:function(b){var h=this,l=b.children,a=h.owner,e,c,k,d,g,j;if(l){e=l.length;for(c=0;c<e;c++){k=l[c];k.el.lastBox=k.props}}b.previousSize=h.lastComponentSize;h.lastComponentSize=a.el.lastBox=g=b.props;d=a.lastBox||(a.lastBox={});d.x=g.x;d.y=g.y;d.width=g.width;d.height=g.height;d.invalid=false;h.callParent(arguments)},notifyOwner:function(d){var c=this,a=c.lastComponentSize,e=d.previousSize,b=[a.width,a.height];if(e){b.push(e.width,e.height)}c.owner.afterComponentLayout.apply(c.owner,b)},getTarget:function(){return this.owner.el},getRenderTarget:function(){return this.owner.el},cacheTargetInfo:function(b){var a=this,d=a.targetInfo,c;if(!d){c=b.getEl("getTarget",a);a.targetInfo=d={padding:c.getPaddingInfo(),border:c.getBorderInfo()}}return d},measureAutoDimensions:function(m,i){var t=this,a=t.owner,q=a.layout,d=m.heightModel,h=m.widthModel,c=m.boxParent,n=m.isBoxParent,b=m.props,j,u={gotWidth:false,gotHeight:false,isContainer:(j=!m.hasRawContent)},s=i||3,p,e,k=0,g=0,l,o,r;if(h.shrinkWrap&&m.consumersContentWidth){++k;p=!(s&1);if(j){if(p){u.contentWidth=0;u.gotWidth=true;++g}else{if((u.contentWidth=m.getProp("contentWidth"))!==undefined){u.gotWidth=true;++g}}}else{o=b.contentWidth;if(typeof o=="number"){u.contentWidth=o;u.gotWidth=true;++g}else{if(p){l=true}else{if(!m.hasDomProp("containerChildrenSizeDone")){l=false}else{if(n||!c||c.widthModel.shrinkWrap){l=true}else{l=c.hasDomProp("width")}}}if(l){if(p){r=0}else{if(q&&q.measureContentWidth){r=q.measureContentWidth(m)}else{r=t.measureContentWidth(m)}}if(!isNaN(u.contentWidth=r)){m.setContentWidth(r,true);u.gotWidth=true;++g}}}}}else{if(h.natural&&m.consumersWidth){++k;o=b.width;if(typeof o=="number"){u.width=o;u.gotWidth=true;++g}else{if(n||!c){l=true}else{l=c.hasDomProp("width")}if(l){if(!isNaN(u.width=t.measureOwnerWidth(m))){m.setWidth(u.width,false);u.gotWidth=true;++g}}}}}if(d.shrinkWrap&&m.consumersContentHeight){++k;e=!(s&2);if(j){if(e){u.contentHeight=0;u.gotHeight=true;++g}else{if((u.contentHeight=m.getProp("contentHeight"))!==undefined){u.gotHeight=true;++g}}}else{o=b.contentHeight;if(typeof o=="number"){u.contentHeight=o;u.gotHeight=true;++g}else{if(e){l=true}else{if(!m.hasDomProp("containerChildrenSizeDone")){l=false}else{if(a.noWrap){l=true}else{if(!h.shrinkWrap){l=(m.bodyContext||m).hasDomProp("width")}else{if(n||!c||c.widthModel.shrinkWrap){l=true}else{l=c.hasDomProp("width")}}}}}if(l){if(e){r=0}else{if(q&&q.measureContentHeight){r=q.measureContentHeight(m)}else{r=t.measureContentHeight(m)}}if(!isNaN(u.contentHeight=r)){m.setContentHeight(r,true);u.gotHeight=true;++g}}}}}else{if(d.natural&&m.consumersHeight){++k;o=b.height;if(typeof o=="number"){u.height=o;u.gotHeight=true;++g}else{if(n||!c){l=true}else{l=c.hasDomProp("width")}if(l){if(!isNaN(u.height=t.measureOwnerHeight(m))){m.setHeight(u.height,false);u.gotHeight=true;++g}}}}}if(c){m.onBoxMeasured()}u.gotAll=g==k;return u},measureContentWidth:function(a){return a.el.getWidth()-a.getFrameInfo().width},measureContentHeight:function(a){return a.el.getHeight()-a.getFrameInfo().height},measureOwnerHeight:function(a){return a.el.getHeight()},measureOwnerWidth:function(a){return a.el.getWidth()}});Ext.define("Ext.layout.component.Auto",{alias:"layout.autocomponent",extend:Ext.layout.component.Component,type:"autocomponent",setHeightInDom:false,setWidthInDom:false,waitForOuterHeightInDom:false,waitForOuterWidthInDom:false,beginLayoutCycle:function(d,a){var c=this,g=c.lastWidthModel,e=c.lastHeightModel,b=c.owner.el;c.callParent(arguments);if(g&&g.fixed&&d.widthModel.shrinkWrap){b.setWidth(null)}if(e&&e.fixed&&d.heightModel.shrinkWrap){b.setHeight(null)}},calculate:function(h){var g=this,e=g.measureAutoDimensions(h),b=h.heightModel,c=h.widthModel,d,a;if(e.gotWidth){if(c.shrinkWrap){g.publishOwnerWidth(h,e.contentWidth)}else{if(g.publishInnerWidth){g.publishInnerWidth(h,e.width)}}}else{if(!c.auto&&g.publishInnerWidth){d=g.waitForOuterWidthInDom?h.getDomProp("width"):h.getProp("width");if(d===undefined){g.done=false}else{g.publishInnerWidth(h,d)}}}if(e.gotHeight){if(b.shrinkWrap){g.publishOwnerHeight(h,e.contentHeight)}else{if(g.publishInnerHeight){g.publishInnerHeight(h,e.height)}}}else{if(!b.auto&&g.publishInnerHeight){a=g.waitForOuterHeightInDom?h.getDomProp("height"):h.getProp("height");if(a===undefined){g.done=false}else{g.publishInnerHeight(h,a)}}}if(!e.gotAll){g.done=false}},calculateOwnerHeightFromContentHeight:function(b,a){return a+b.getFrameInfo().height},calculateOwnerWidthFromContentWidth:function(b,a){return a+b.getFrameInfo().width},publishOwnerHeight:function(i,g){var e=this,b=e.owner,a=e.calculateOwnerHeightFromContentHeight(i,g),h,d,c;if(isNaN(a)){e.done=false}else{h=Ext.Number.constrain(a,b.minHeight,b.maxHeight);if(h==a){d=e.setHeightInDom}else{c=e.sizeModels[(h<a)?"constrainedMax":"constrainedMin"];a=h;if(i.heightModel.calculatedFromShrinkWrap){i.heightModel=c}else{i.invalidate({heightModel:c})}}i.setHeight(a,d)}},publishOwnerWidth:function(h,b){var g=this,a=g.owner,e=g.calculateOwnerWidthFromContentWidth(h,b),i,d,c;if(isNaN(e)){g.done=false}else{i=Ext.Number.constrain(e,a.minWidth,a.maxWidth);if(i==e){d=g.setWidthInDom}else{c=g.sizeModels[(i<e)?"constrainedMax":"constrainedMin"];e=i;if(h.widthModel.calculatedFromShrinkWrap){h.widthModel=c}else{h.invalidate({widthModel:c})}}h.setWidth(e,d)}}});Ext.define("Ext.container.AbstractContainer",{extend:Ext.Component,renderTpl:"{%this.renderContainer(out,values)%}",suspendLayout:false,autoDestroy:true,defaultType:"panel",detachOnRemove:true,isContainer:true,layoutCounter:0,baseCls:Ext.baseCSSPrefix+"container",defaultLayoutType:"auto",initComponent:function(){var a=this;a.addEvents("afterlayout","beforeadd","beforeremove","add","remove");a.callParent();a.getLayout();a.initItems()},initItems:function(){var b=this,a=b.items;b.items=new Ext.util.AbstractMixedCollection(false,b.getComponentId);b.floatingItems=new Ext.util.MixedCollection(false,b.getComponentId);if(a){if(!Ext.isArray(a)){a=[a]}b.add(a)}},getFocusEl:function(){return this.getTargetEl()},finishRenderChildren:function(){this.callParent();var a=this.getLayout();if(a){a.finishRender()}},beforeRender:function(){var b=this,a=b.getLayout(),c;b.callParent();if(!a.initialized){a.initLayout()}c=a.targetCls;if(c){b.applyTargetCls(c)}},applyTargetCls:function(a){this.addCls(a)},afterComponentLayout:function(){var b=this.floatingItems.items,a=b.length,d,c;this.callParent(arguments);for(d=0;d<a;d++){c=b[d];if(!c.rendered&&c.autoShow){c.show()}}},onPosition:function(){this.callParent(arguments);this.repositionFloatingItems()},onResize:function(){this.callParent(arguments);this.repositionFloatingItems()},repositionFloatingItems:function(){var b=this.floatingItems.items,a=b.length,d,c;for(d=0;d<a;d++){c=b[d];if(c.el&&!c.hidden){c.setPosition(c.x,c.y)}}},setupRenderTpl:function(a){this.callParent(arguments);this.getLayout().setupRenderTpl(a)},getDefaultContentTarget:function(){return this.el},getContentTarget:function(){return this.getLayout().getContentTarget()},setLayout:function(b){var a=this.layout;if(a&&a.isLayout&&a!=b){a.setOwner(null)}this.layout=b;b.setOwner(this)},getLayout:function(){var a=this;if(!a.layout||!a.layout.isLayout){a.setLayout(Ext.layout.Layout.create(a.layout,a.self.prototype.layout||a.defaultLayoutType))}return a.layout},doLayout:function(){this.updateLayout();return this},afterLayout:function(b){var a=this;++a.layoutCounter;if(a.hasListeners.afterlayout){a.fireEvent("afterlayout",a,b)}},prepareItems:function(b,d){if(Ext.isArray(b)){b=b.slice()}else{b=[b]}var g=this,c=0,a=b.length,e;for(;c<a;c++){e=b[c];if(e==null){Ext.Array.erase(b,c,1);--c;--a}else{if(d){e=this.applyDefaults(e)}e.isContained=g;b[c]=g.lookupComponent(e);delete e.isContained;delete b[c].isContained}}return b},applyDefaults:function(a){var b=this.defaults;if(b){if(Ext.isFunction(b)){b=b.call(this,a)}if(Ext.isString(a)){a=Ext.ComponentManager.get(a)}Ext.applyIf(a,b)}return a},lookupComponent:function(a){return(typeof a=="string")?Ext.ComponentManager.get(a):Ext.ComponentManager.create(a,this.defaultType)},getComponentId:function(a){if(a.getItemId){return a.getItemId()}},add:function(){var j=this,g=Ext.Array.slice(arguments),d=(typeof g[0]=="number")?g.shift():-1,c=j.getLayout(),l,h,b,a,m,k,e;if(g.length==1&&Ext.isArray(g[0])){h=g[0];l=true}else{h=g}e=h=j.prepareItems(h,true);a=h.length;if(j.rendered){Ext.suspendLayouts()}if(!l&&a==1){e=h[0]}for(b=0;b<a;b++){m=h[b];k=(d<0)?j.items.length:(d+b);if(m.floating){j.floatingItems.add(m);m.onAdded(j,k);if(j.hasListeners.add){j.fireEvent("add",j,m,k)}}else{if((!j.hasListeners.beforeadd||j.fireEvent("beforeadd",j,m,k)!==false)&&j.onBeforeAdd(m)!==false){j.items.insert(k,m);m.onAdded(j,k);j.onAdd(m,k);c.onAdd(m,k);if(j.hasListeners.add){j.fireEvent("add",j,m,k)}}}}j.updateLayout();if(j.rendered){Ext.resumeLayouts(true)}return e},onAdd:Ext.emptyFn,onRemove:Ext.emptyFn,insert:function(b,a){return this.add(b,a)},move:function(b,d){var a=this.items,c;c=a.removeAt(b);if(c===false){return false}a.insert(d,c);this.onMove(c,b,d);this.updateLayout();return c},onMove:Ext.emptyFn,onBeforeAdd:function(a){if(a.ownerCt&&a.ownerCt!==this){a.ownerCt.remove(a,false)}},remove:function(a,b){var d=this,e=d.getComponent(a);if(e&&(!d.hasListeners.beforeremove||d.fireEvent("beforeremove",d,e)!==false)){d.doRemove(e,b);if(d.hasListeners.remove){d.fireEvent("remove",d,e)}if(!d.destroying&&!e.floating){d.updateLayout()}}return e},doRemove:function(c,b){b=b===true||(b!==false&&this.autoDestroy);var g=this,e=g.layout,a=e&&g.rendered,d=c.destroying||b,h=c.floating;if(h){g.floatingItems.remove(c)}else{g.items.remove(c)}if(a&&!h){if(e.running){Ext.AbstractComponent.cancelLayout(c,d)}e.onRemove(c,d)}c.onRemoved(d);g.onRemove(c,d);if(b){c.destroy()}else{if(a&&!h){e.afterRemove(c)}if(g.detachOnRemove&&c.rendered){g.detachComponent(c)}}},detachComponent:function(a){Ext.getDetachedBody().appendChild(a.getEl())},removeAll:function(c){var h=this,e=h.items.items.slice().concat(h.floatingItems.items),b=[],d=0,a=e.length,g;h.suspendLayouts();for(;d<a;d++){g=e[d];h.remove(g,c);if(g.ownerCt!==h){b.push(g)}}h.resumeLayouts(!!a);return b},getRefItems:function(c){var h=this,d=h.items.items,b=d.length,e=0,g,a=[];for(;e<b;e++){g=d[e];a.push(g);if(c&&g.getRefItems){a.push.apply(a,g.getRefItems(true))}}a.push.apply(a,h.floatingItems.items);return a},cascade:function(l,m,a){var k=this,e=k.items?k.items.items:[],g=e.length,d=0,j,h=a?a.concat(k):[k],b=h.length-1;if(l.apply(m||k,h)!==false){for(;d<g;d++){j=e[d];if(j.cascade){j.cascade(l,m,a)}else{h[b]=j;l.apply(m||e,h)}}}return this},isAncestor:function(a){while(a){if(a.ownerCt===this){return true}a=a.ownerCt}},getComponent:function(a){if(Ext.isObject(a)){a=a.getItemId()}var b=this.items.get(a);if(!b&&typeof a!="number"){b=this.floatingItems.get(a)}return b},query:function(a){a=a||"*";return Ext.ComponentQuery.query(a,this)},queryBy:function(g,e){var c=[],b=this.getRefItems(true),d=0,a=b.length,h;for(;d<a;++d){h=b[d];if(g.call(e||h,h)!==false){c.push(h)}}return c},queryById:function(a){return this.down("#"+a)},child:function(a){if(a&&a.isComponent){a="#"+Ext.escapeId(a.getItemId())}a=a||"";return this.query("> "+a)[0]||null},contains:function(c,b){var a=false;if(b){this.cascade(function(d){if(d.contains&&d.contains(c)){a=true;return false}});return a}else{return this.items.contains(c)||this.floatingItems.contains(c)}},nextChild:function(e,b){var c=this,a,d=c.items.indexOf(e);if(d!==-1){a=b?Ext.ComponentQuery(b,c.items.items.slice(d+1)):c.items.getAt(d+1);if(!a&&c.ownerCt){a=c.ownerCt.nextChild(c,b)}}return a},prevChild:function(e,b){var c=this,a,d=c.items.indexOf(e);if(d!==-1){a=b?Ext.ComponentQuery(b,c.items.items.slice(d+1)):c.items.getAt(d+1);if(!a&&c.ownerCt){a=c.ownerCt.nextChild(c,b)}}return a},down:function(a){if(a&&a.isComponent){a="#"+Ext.escapeId(a.getItemId())}a=a||"";return this.query(a)[0]||null},enable:function(){this.callParent(arguments);var d=this.getChildItemsToDisable(),c=d.length,b,a;for(a=0;a<c;a++){b=d[a];if(b.resetDisable){b.enable()}}return this},disable:function(){this.callParent(arguments);var d=this.getChildItemsToDisable(),c=d.length,b,a;for(a=0;a<c;a++){b=d[a];if(b.resetDisable!==false&&!b.disabled){b.disable();b.resetDisable=true}}return this},getChildItemsToDisable:function(){return this.query("[isFormField],button")},beforeDestroy:function(){var b=this,a=b.items,d=b.floatingItems,e;if(a){while((e=a.first())){b.doRemove(e,true)}}if(d){while((e=d.first())){b.doRemove(e,true)}}Ext.destroy(b.layout);b.callParent()}});Ext.define("Ext.container.Container",{extend:Ext.container.AbstractContainer,alias:"widget.container",alternateClassName:"Ext.Container",getChildByElement:function(e,a){var h,c,b=0,d=this.getRefItems(),g=d.length;e=Ext.getDom(e);for(;b<g;b++){h=d[b];c=h.getEl();if(c&&((c.dom===e)||c.contains(e))){return(a&&h.getChildByElement)?h.getChildByElement(e,a):h}}return null}});Ext.define("Ext.layout.container.Editor",{alias:"layout.editor",extend:Ext.layout.container.Container,autoSizeDefault:{width:"field",height:"field"},sizePolicies:{$:{$:{readsWidth:1,readsHeight:1,setsWidth:0,setsHeight:0},boundEl:{readsWidth:1,readsHeight:0,setsWidth:0,setsHeight:1}},boundEl:{$:{readsWidth:0,readsHeight:1,setsWidth:1,setsHeight:0},boundEl:{readsWidth:0,readsHeight:0,setsWidth:1,setsHeight:1}}},getItemSizePolicy:function(d){var c=this,a=c.owner.autoSize,b=a&&a.width,e=c.sizePolicies;e=e[b]||e.$;b=a&&a.height;e=e[b]||e.$;return e},calculate:function(g){var e=this,b=e.owner,a=b.autoSize,d,c;if(a===true){a=e.autoSizeDefault}if(a){d=e.getDimension(b,a.width,"getWidth",b.width);c=e.getDimension(b,a.height,"getHeight",b.height)}g.childItems[0].setSize(d,c);g.setWidth(d);g.setHeight(c);g.setContentSize(d||b.field.getWidth(),c||b.field.getHeight())},getDimension:function(a,b,d,c){switch(b){case"boundEl":return a.boundEl[d]();case"field":return undefined;default:return c}}});Ext.define("Ext.Editor",{extend:Ext.container.Container,alias:"widget.editor",layout:"editor",allowBlur:true,revertInvalid:true,value:"",alignment:"c-c?",offsets:[0,0],shadow:"frame",constrain:false,swallowKeys:true,completeOnEnter:true,cancelOnEsc:true,updateEl:false,focusOnToFront:false,hidden:true,baseCls:Ext.baseCSSPrefix+"editor",initComponent:function(){var a=this,b=a.field=Ext.ComponentManager.create(a.field,"textfield");Ext.apply(b,{inEditor:true,msgTarget:b.msgTarget=="title"?"title":"qtip"});a.mon(b,{scope:a,blur:{fn:a.onFieldBlur,delay:1},specialkey:a.onSpecialKey});if(b.grow){a.mon(b,"autosize",a.onFieldAutosize,a,{delay:1})}a.floating={constrain:a.constrain};a.items=b;a.callParent(arguments);a.addEvents("beforestartedit","startedit","beforecomplete","complete","canceledit","specialkey")},onFieldAutosize:function(){this.updateLayout()},afterRender:function(b,a){var c=this,e=c.field,d=e.inputEl;c.callParent(arguments);if(d){d.dom.name="";if(c.swallowKeys){d.swallowEvent(["keypress","keydown"])}}},onSpecialKey:function(g,e){var d=this,b=e.getKey(),a=d.completeOnEnter&&b==e.ENTER,c=d.cancelOnEsc&&b==e.ESC;if(a||c){e.stopEvent();Ext.defer(function(){if(a){d.completeEdit()}else{d.cancelEdit()}if(g.triggerBlur){g.triggerBlur(e)}},10)}d.fireEvent("specialkey",d,g,e)},startEdit:function(a,c){var b=this,d=b.field;b.completeEdit();b.boundEl=Ext.get(a);c=Ext.isDefined(c)?c:Ext.String.trim(b.boundEl.dom.innerText||b.boundEl.dom.innerHTML);if(!b.rendered){if(b.ownerCt){b.parentEl=b.ownerCt.el;b.parentEl.position()}b.render(b.parentEl||document.body)}if(b.fireEvent("beforestartedit",b,b.boundEl,c)!==false){b.startValue=c;b.show();d.suspendEvents();d.reset();d.setValue(c);d.resumeEvents();b.realign(true);d.focus(false,10);if(d.autoSize){d.autoSize()}b.editing=true}},realign:function(a){var b=this;if(a===true){b.updateLayout()}b.alignTo(b.boundEl,b.alignment,b.offsets)},completeEdit:function(a){var b=this,d=b.field,c;if(!b.editing){return}if(d.assertValue){d.assertValue()}c=b.getValue();if(!d.isValid()){if(b.revertInvalid!==false){b.cancelEdit(a)}return}if(String(c)===String(b.startValue)&&b.ignoreNoChange){b.hideEdit(a);return}if(b.fireEvent("beforecomplete",b,c,b.startValue)!==false){c=b.getValue();if(b.updateEl&&b.boundEl){b.boundEl.update(c)}b.hideEdit(a);b.fireEvent("complete",b,c,b.startValue)}},onShow:function(){var a=this;a.callParent(arguments);if(a.hideEl!==false){a.boundEl.hide()}a.fireEvent("startedit",a,a.boundEl,a.startValue)},cancelEdit:function(a){var c=this,b=c.startValue,e=c.field,d;if(c.editing){d=c.getValue();e.suspendEvents();c.setValue(b);e.resumeEvents();c.hideEdit(a);c.fireEvent("canceledit",c,d,b)}},hideEdit:function(a){if(a!==true){this.editing=false;this.hide()}},onFieldBlur:function(d,c){var a=this,b=Ext.Element.getActiveElement();if(a.allowBlur===true&&a.editing&&a.selectSameEditor!==true){a.completeEdit()}if(Ext.fly(b).isFocusable()||b.getAttribute("tabIndex")){b.focus()}},onHide:function(){var a=this,b=a.field;if(a.editing){a.completeEdit();return}if(b.hasFocus){b.blur()}if(b.collapse){b.collapse()}if(a.hideEl!==false){a.boundEl.show()}a.callParent(arguments)},setValue:function(a){this.field.setValue(a)},getValue:function(){return this.field.getValue()},beforeDestroy:function(){var a=this;Ext.destroy(a.field);delete a.field;delete a.parentEl;delete a.boundEl;a.callParent(arguments)}});Ext.define("Ext.util.KeyMap",{alternateClassName:"Ext.KeyMap",eventName:"keydown",constructor:function(a){var b=this;if((arguments.length!==1)||(typeof a==="string")||a.dom||a.tagName||a===document||a.isComponent){b.legacyConstructor.apply(b,arguments);return}Ext.apply(b,a);b.bindings=[];if(!b.target.isComponent){b.target=Ext.get(b.target)}if(b.binding){b.addBinding(b.binding)}else{if(a.key){b.addBinding(a)}}b.enable()},legacyConstructor:function(b,d,a){var c=this;Ext.apply(c,{target:Ext.get(b),eventName:a||c.eventName,bindings:[]});if(d){c.addBinding(d)}c.enable()},addBinding:function(e){var c=this,d=e.key,b,a;if(c.processing){c.bindings=bindings.slice(0)}if(Ext.isArray(e)){for(b=0,a=e.length;b<a;b++){c.addBinding(e[b])}return}c.bindings.push(Ext.apply({keyCode:c.processKeys(d)},e))},removeBinding:function(g){var e=this,h=e.bindings,a=h.length,b,d,c;if(e.processing){e.bindings=h.slice(0)}c=e.processKeys(g.key);for(b=0;b<a;++b){d=h[b];if(d.fn===g.fn&&d.scope===g.scope){if(g.alt==d.alt&&g.crtl==d.crtl&&g.shift==d.shift){if(Ext.Array.equals(d.keyCode,c)){Ext.Array.erase(e.bindings,b,1);return}}}}},processKeys:function(g){var h=false,d,e,b,a,c;if(Ext.isString(g)){e=[];b=g.toUpperCase();for(c=0,a=b.length;c<a;++c){e.push(b.charCodeAt(c))}g=e;h=true}if(!Ext.isArray(g)){g=[g]}if(!h){for(c=0,a=g.length;c<a;++c){d=g[c];if(Ext.isString(d)){g[c]=d.toUpperCase().charCodeAt(0)}}}return g},handleTargetEvent:(function(){var a=/input|textarea/i;return function(g){var e=this,j,c,b,h,d;if(e.enabled){j=e.bindings;c=0;b=j.length;g=e.processEvent.apply(e||e.processEventScope,arguments);if(e.ignoreInputFields){h=g.target;d=h.contentEditable;if(a.test(h.tagName)||(d===""||d==="true")){return}}if(!g.getKey){return g}e.processing=true;for(;c<b;++c){e.processBinding(j[c],g)}e.processing=false}}}()),processEvent:Ext.identityFn,processBinding:function(g,a){if(this.checkModifiers(g,a)){var h=a.getKey(),k=g.fn||g.handler,l=g.scope||this,j=g.keyCode,b=g.defaultEventAction,c,e,d=new Ext.EventObjectImpl(a);for(c=0,e=j.length;c<e;++c){if(h===j[c]){if(k.call(l,h,a)!==true&&b){d[b]()}break}}}},checkModifiers:function(j,g){var d=["shift","ctrl","alt"],c=0,a=d.length,h,b;for(;c<a;++c){b=d[c];h=j[b];if(!(h===undefined||(h===g[b+"Key"]))){return false}}return true},on:function(b,d,c){var h,a,e,g;if(Ext.isObject(b)&&!Ext.isArray(b)){h=b.key;a=b.shift;e=b.ctrl;g=b.alt}else{h=b}this.addBinding({key:h,shift:a,ctrl:e,alt:g,fn:d,scope:c})},un:function(b,d,c){var h,a,e,g;if(Ext.isObject(b)&&!Ext.isArray(b)){h=b.key;a=b.shift;e=b.ctrl;g=b.alt}else{h=b}this.removeBinding({key:h,shift:a,ctrl:e,alt:g,fn:d,scope:c})},isEnabled:function(){return this.enabled},enable:function(){var a=this;if(!a.enabled){a.target.on(a.eventName,a.handleTargetEvent,a);a.enabled=true}},disable:function(){var a=this;if(a.enabled){a.target.removeListener(a.eventName,a.handleTargetEvent,a);a.enabled=false}},setDisabled:function(a){if(a){this.disable()}else{this.enable()}},destroy:function(c){var a=this,b=a.target;a.bindings=[];a.disable();if(c===true){if(b.isComponent){b.destroy()}else{b.remove()}}delete a.target}});Ext.define("Ext.util.KeyNav",{alternateClassName:"Ext.KeyNav",statics:{keyOptions:{left:37,right:39,up:38,down:40,space:32,pageUp:33,pageDown:34,del:46,backspace:8,home:36,end:35,enter:13,esc:27,tab:9}},constructor:function(a){var b=this;if(arguments.length===2){b.legacyConstructor.apply(b,arguments);return}b.setConfig(a)},legacyConstructor:function(b,a){this.setConfig(Ext.apply({target:b},a))},setConfig:function(b){var e=this,c={target:b.target,ignoreInputFields:b.ignoreInputFields,eventName:e.getKeyEvent("forceKeyDown" in b?b.forceKeyDown:e.forceKeyDown,b.eventName)},g,a,i,d,h;if(e.map){e.map.destroy()}if(b.processEvent){c.processEvent=b.processEvent;c.processEventScope=b.processEventScope||e}if(b.keyMap){g=e.map=b.keyMap}else{g=e.map=new Ext.util.KeyMap(c);e.destroyKeyMap=true}a=Ext.util.KeyNav.keyOptions;i=b.scope||e;for(d in a){if(a.hasOwnProperty(d)){if(h=b[d]){if(typeof h==="function"){h={handler:h,defaultEventAction:(b.defaultEventAction!==undefined)?b.defaultEventAction:e.defaultEventAction}}g.addBinding({key:a[d],handler:Ext.Function.bind(e.handleEvent,h.scope||i,h.handler||h.fn,true),defaultEventAction:(h.defaultEventAction!==undefined)?h.defaultEventAction:e.defaultEventAction})}}}g.disable();if(!b.disabled){g.enable()}},handleEvent:function(c,b,a){return a.call(this,b)},disabled:false,defaultEventAction:"stopEvent",forceKeyDown:false,eventName:"keypress",destroy:function(a){if(this.destroyKeyMap){this.map.destroy(a)}delete this.map},enable:function(){this.map.enable();this.disabled=false},disable:function(){this.map.disable();this.disabled=true},setDisabled:function(a){this.map.setDisabled(a);this.disabled=a},getKeyEvent:function(b,a){if(b||(Ext.EventManager.useKeyDown&&!a)){return"keydown"}else{return a||this.eventName}}});Ext.define("Ext.FocusManager",{singleton:true,alternateClassName:["Ext.FocusMgr"],mixins:{observable:Ext.util.Observable},enabled:false,focusElementCls:Ext.baseCSSPrefix+"focus-element",focusFrameCls:Ext.baseCSSPrefix+"focus-frame",whitelist:["textfield"],constructor:function(a){var b=this,c=Ext.ComponentQuery;b.mixins.observable.constructor.call(b,a);b.addEvents("beforecomponentfocus","componentfocus","disable","enable");b.focusTask=new Ext.util.DelayedTask(b.handleComponentFocus,b);Ext.override(Ext.AbstractComponent,{onFocus:function(){this.callParent(arguments);if(b.enabled&&this.hasFocus){Array.prototype.unshift.call(arguments,this);b.onComponentFocus.apply(b,arguments)}},onBlur:function(){this.callParent(arguments);if(b.enabled&&!this.hasFocus){Array.prototype.unshift.call(arguments,this);b.onComponentBlur.apply(b,arguments)}},onDestroy:function(){this.callParent(arguments);if(b.enabled){Array.prototype.unshift.call(arguments,this);b.onComponentDestroy.apply(b,arguments)}}});Ext.override(Ext.Component,{afterHide:function(){this.callParent(arguments);if(b.enabled){Array.prototype.unshift.call(arguments,this);b.onComponentHide.apply(b,arguments)}}});b.keyNav=new Ext.util.KeyNav(Ext.getDoc(),{disabled:true,scope:b,backspace:b.focusLast,enter:b.navigateIn,esc:b.navigateOut,tab:b.navigateSiblings,space:b.navigateIn,del:b.focusLast,left:b.navigateSiblings,right:b.navigateSiblings,down:b.navigateSiblings,up:b.navigateSiblings});b.focusData={};b.subscribers=new Ext.util.HashMap();b.focusChain={};Ext.apply(c.pseudos,{nextFocus:function(g,e,j){j=j||1;e=parseInt(e,10);var d=g.length,h=e,k;for(;;){if((h+=j)>=d){h=0}else{if(h<0){h=d-1}}if(h===e){return[]}if((k=g[h]).isFocusable()){return[k]}}return[]},prevFocus:function(e,d){return this.nextFocus(e,d,-1)},root:function(e){var d=e.length,h=[],g=0,j;for(;g<d;g++){j=e[g];if(!j.ownerCt){h.push(j)}}return h}})},addXTypeToWhitelist:function(b){var a=this;if(Ext.isArray(b)){Ext.Array.forEach(b,a.addXTypeToWhitelist,a);return}if(!Ext.Array.contains(a.whitelist,b)){a.whitelist.push(b)}},clearComponent:function(a){clearTimeout(this.cmpFocusDelay);if(!a.isDestroyed){a.blur()}},disable:function(){var a=this;if(!a.enabled){return}delete a.options;a.enabled=false;a.removeDOM();a.keyNav.disable();a.fireEvent("disable",a)},enable:function(a){var b=this;if(a===true){a={focusFrame:true}}b.options=a=a||{};if(b.enabled){return}b.enabled=true;b.initDOM(a);b.keyNav.enable();b.focusEl.focus();delete b.focusedCmp;b.fireEvent("enable",b)},focusLast:function(b){var a=this;if(a.isWhitelisted(a.focusedCmp)){return true}if(a.previousFocusedCmp){a.previousFocusedCmp.focus()}},getRootComponents:function(){var b=Ext.ComponentQuery,a=b.query(":focusable:root:not([floating])"),c=b.query(":focusable:root[floating]");c.sort(function(e,d){return e.el.getZIndex()>d.el.getZIndex()});return c.concat(a)},initDOM:function(c){var g=this,b=g.focusFrameCls,e=Ext.ComponentQuery.query("{getFocusEl()}:not([focusListenerAdded])"),d=0,a=e.length;if(!Ext.isReady){return Ext.onReady(g.initDOM,g)}for(;d<a;d++){e[d].addFocusListener()}if(!g.focusEl){g.focusEl=Ext.getBody();g.focusEl.dom.tabIndex=-1}if(!g.focusFrame&&c.focusFrame){g.focusFrame=Ext.getBody().createChild({cls:b,children:[{cls:b+"-top"},{cls:b+"-bottom"},{cls:b+"-left"},{cls:b+"-right"}],style:"top: -100px; left: -100px;"});g.focusFrame.setVisibilityMode(Ext.Element.DISPLAY);g.focusFrame.hide().setLocalXY(0,0)}},isWhitelisted:function(a){return a&&Ext.Array.some(this.whitelist,function(b){return a.isXType(b)})},navigateIn:function(g){var c=this,a=c.focusedCmp,b,d;if(c.isWhitelisted(a)){return true}if(!a){b=c.getRootComponents()[0];if(b){if(b.getFocusEl()===c.focusEl){c.focusEl.blur()}b.focus()}}else{d=a.hasFocus?Ext.ComponentQuery.query(">:focusable",a)[0]:a;if(d){d.focus()}else{if(Ext.isFunction(a.onClick)){g.button=0;a.onClick(g);if(a.isVisible(true)){a.focus()}else{c.navigateOut()}}}}},navigateOut:function(c){var b=this,a;if(!b.focusedCmp||!(a=b.focusedCmp.up(":focusable"))){b.focusEl.focus()}else{a.focus()}return true},navigateSiblings:function(i,b,o){var j=this,a=b||j,p=i.getKey(),g=Ext.EventObject,k=i.shiftKey||p==g.LEFT||p==g.UP,c=p==g.LEFT||p==g.RIGHT||p==g.UP||p==g.DOWN,h=k?"prev":"next",n,d,m,l;m=(a.focusedCmp&&a.focusedCmp.comp)||a.focusedCmp;if(!m&&!o){return true}if(c&&j.isWhitelisted(m)){return true}if(!m||m.is(":root")){l=j.getRootComponents()}else{o=o||m.up();if(o){l=o.getRefItems()}}if(l){n=m?Ext.Array.indexOf(l,m):-1;d=Ext.ComponentQuery.query(":"+h+"Focus("+n+")",l)[0];if(d&&m!==d){d.focus();return d}}},onComponentBlur:function(b,c){var a=this;if(a.focusedCmp===b){a.previousFocusedCmp=b;delete a.focusedCmp}if(a.focusFrame){a.focusFrame.hide()}},onComponentFocus:function(d,g){var c=this,a=c.focusChain,b;if(!d.isFocusable()){c.clearComponent(d);if(a[d.id]){return}b=d.up();if(b){a[d.id]=true;b.focus()}return}c.focusChain={};c.focusTask.delay(10,null,null,[d,d.getFocusEl()])},handleComponentFocus:function(l,h){var j=this,o,a,g,n,b,k,d,e,c,m,i;if(j.fireEvent("beforecomponentfocus",j,l,j.previousFocusedCmp)===false){j.clearComponent(l);return}j.focusedCmp=l;if(j.shouldShowFocusFrame(l)){o="."+j.focusFrameCls+"-";a=j.focusFrame;g=(h.dom?h:h.el).getBox();n=g.top;b=g.left;k=g.width;d=g.height;e=a.child(o+"top");c=a.child(o+"bottom");m=a.child(o+"left");i=a.child(o+"right");e.setWidth(k).setLocalXY(b,n);c.setWidth(k).setLocalXY(b,n+d-2);m.setHeight(d-2).setLocalXY(b,n+2);i.setHeight(d-2).setLocalXY(b+k-2,n+2);a.show()}j.fireEvent("componentfocus",j,l,j.previousFocusedCmp)},onComponentHide:function(e){var d=this,b=false,a=d.focusedCmp,c;if(a){b=e.hasFocus||(e.isContainer&&e.isAncestor(d.focusedCmp))}d.clearComponent(e);if(b&&(c=e.up(":focusable"))){c.focus()}else{d.focusEl.focus()}},onComponentDestroy:function(){},removeDOM:function(){var a=this;if(a.enabled||a.subscribers.length){return}Ext.destroy(a.focusFrame);delete a.focusEl;delete a.focusFrame},removeXTypeFromWhitelist:function(b){var a=this;if(Ext.isArray(b)){Ext.Array.forEach(b,a.removeXTypeFromWhitelist,a);return}Ext.Array.remove(a.whitelist,b)},setupSubscriberKeys:function(a,g){var e=this,d=a.getFocusEl(),c=g.scope,b={backspace:e.focusLast,enter:e.navigateIn,esc:e.navigateOut,scope:e},h=function(i){if(e.focusedCmp===a){return e.navigateSiblings(i,e,a)}else{return e.navigateSiblings(i)}};Ext.iterate(g,function(j,i){b[j]=function(l){var k=h(l);if(Ext.isFunction(i)&&i.call(c||a,l,k)===true){return true}return k}},e);return new Ext.util.KeyNav(d,b)},shouldShowFocusFrame:function(c){var b=this,a=b.options||{};if(!b.focusFrame||!c){return false}if(a.focusFrame){return true}if(b.focusData[c.id].focusFrame){return true}return false}});Ext.define("Ext.Img",{extend:Ext.Component,alias:["widget.image","widget.imagecomponent"],autoEl:"img",baseCls:Ext.baseCSSPrefix+"img",src:"",alt:"",title:"",imgCls:"",initComponent:function(){if(this.glyph){this.autoEl="div"}this.callParent()},getElConfig:function(){var e=this,b=e.callParent(),g=Ext._glyphFontFamily,d=e.glyph,a,c;if(e.autoEl=="img"){a=b}else{if(e.glyph){if(typeof d==="string"){c=d.split("@");d=c[0];g=c[1]}b.html="&#"+d+";";if(g){b.style="font-family:"+g}}else{b.cn=[a={tag:"img",id:e.id+"-img"}]}}if(a){if(e.imgCls){a.cls=(a.cls?a.cls+" ":"")+e.imgCls}a.src=e.src||Ext.BLANK_IMAGE_URL}if(e.alt){(a||b).alt=e.alt}if(e.title){(a||b).title=e.title}return b},onRender:function(){var b=this,a;b.callParent(arguments);a=b.el;b.imgEl=(b.autoEl=="img")?a:a.getById(b.id+"-img")},onDestroy:function(){Ext.destroy(this.imgEl);this.imgEl=null;this.callParent()},setSrc:function(c){var a=this,b=a.imgEl;a.src=c;if(b){b.dom.src=c||Ext.BLANK_IMAGE_URL}},setGlyph:function(c){var b=this,d=Ext._glyphFontFamily,a,e;if(c!=b.glyph){if(typeof c==="string"){a=c.split("@");c=a[0];d=a[1]}e=b.el.dom;e.innerHTML="&#"+c+";";if(d){e.style="font-family:"+d}}}});Ext.define("Ext.util.Bindable",{bindStore:function(b,c,a){a=a||"store";var d=this,e=d[a];if(!c&&e){d.onUnbindStore(e,c,a);if(b!==e&&e.autoDestroy){e.destroyStore()}else{d.unbindStoreListeners(e)}}if(b){b=Ext.data.StoreManager.lookup(b);d.bindStoreListeners(b);d.onBindStore(b,c,a)}d[a]=b||null;return d},getStore:function(){return this.store},unbindStoreListeners:function(a){var b=this.storeListeners;if(b){a.un(b)}},bindStoreListeners:function(a){var c=this,b=Ext.apply({},c.getStoreListeners(a));if(!b.scope){b.scope=c}c.storeListeners=b;a.on(b)},getStoreListeners:Ext.emptyFn,onUnbindStore:Ext.emptyFn,onBindStore:Ext.emptyFn});Ext.define("Ext.LoadMask",{extend:Ext.Component,alias:"widget.loadmask",mixins:{floating:Ext.util.Floating,bindable:Ext.util.Bindable},msg:"Loading...",msgCls:Ext.baseCSSPrefix+"mask-loading",maskCls:Ext.baseCSSPrefix+"mask",useMsg:true,useTargetEl:false,baseCls:Ext.baseCSSPrefix+"mask-msg",childEls:["msgEl","msgTextEl"],renderTpl:['<div id="{id}-msgEl" class="{[values.$comp.msgCls]} ',Ext.baseCSSPrefix,'mask-msg-inner{childElCls}">','<div id="{id}-msgTextEl" class="',Ext.baseCSSPrefix,"mask-msg-text",'{childElCls}"></div>',"</div>"],floating:{shadow:"frame"},focusOnToFront:false,bringParentToFront:false,constructor:function(b){var c=this,a;if(arguments.length===2){a=b;b=arguments[1]}else{a=b.target}if(!a.isComponent){a=Ext.get(a);this.isElement=true}c.ownerCt=a;if(!this.isElement){c.bindComponent(a)}c.callParent([b]);if(c.store){c.bindStore(c.store,true)}},bindComponent:function(a){var c=this,b={scope:this,resize:c.sizeMask,added:c.onComponentAdded,removed:c.onComponentRemoved};if(a.floating){b.move=c.sizeMask;c.activeOwner=a}else{if(a.ownerCt){c.onComponentAdded(a.ownerCt)}else{c.preventBringToFront=true}}c.mon(a,b);c.mon(c.hierarchyEventSource,{show:c.onContainerShow,hide:c.onContainerHide,expand:c.onContainerExpand,collapse:c.onContainerCollapse,scope:c})},onComponentAdded:function(a){var b=this;delete b.activeOwner;b.floatParent=a;if(!a.floating){a=a.up("[floating]")}if(a){b.activeOwner=a;b.mon(a,"move",b.sizeMask,b)}else{b.preventBringToFront=true}a=b.floatParent.ownerCt;if(b.rendered&&b.isVisible()&&a){b.floatOwner=a;b.mon(a,"afterlayout",b.sizeMask,b,{single:true})}},onComponentRemoved:function(a){var c=this,d=c.activeOwner,b=c.floatOwner;if(d){c.mun(d,"move",c.sizeMask,c)}if(b){c.mun(b,"afterlayout",c.sizeMask,c)}delete c.activeOwner;delete c.floatOwner},afterRender:function(){this.callParent(arguments);this.container=this.floatParent.getContentTarget()},onContainerShow:function(a){if(this.isActiveContainer(a)){this.onComponentShow()}},onContainerHide:function(a){if(this.isActiveContainer(a)){this.onComponentHide()}},onContainerExpand:function(a){if(this.isActiveContainer(a)){this.onComponentShow()}},onContainerCollapse:function(a){if(this.isActiveContainer(a)){this.onComponentHide()}},isActiveContainer:function(a){return this.isDescendantOf(a)},onComponentHide:function(){var a=this;if(a.rendered&&a.isVisible()){a.hide();a.showNext=true}},onComponentShow:function(){if(this.showNext){this.show()}delete this.showNext},sizeMask:function(){var a=this,b;if(a.rendered&&a.isVisible()){a.center();b=a.getMaskTarget();a.getMaskEl().show().setSize(b.getSize()).alignTo(b,"tl-tl")}},bindStore:function(a,b){var c=this;c.mixins.bindable.bindStore.apply(c,arguments);a=c.store;if(a&&a.isLoading()){c.onBeforeLoad()}},getStoreListeners:function(b){var d=this.onLoad,c=this.onBeforeLoad,a={cachemiss:c,cachefilled:d};if(!b.proxy.isSynchronous){a.beforeLoad=c;a.load=d;a.prefetch=d}return a},onDisable:function(){this.callParent(arguments);if(this.loading){this.onLoad()}},getOwner:function(){return this.ownerCt||this.floatParent},getMaskTarget:function(){var a=this.getOwner();return this.useTargetEl?a.getTargetEl():a.getEl()},onBeforeLoad:function(){var c=this,a=c.getOwner(),b;if(!c.disabled){c.loading=true;if(a.componentLayoutCounter){c.maybeShow()}else{b=a.afterComponentLayout;a.afterComponentLayout=function(){a.afterComponentLayout=b;b.apply(a,arguments);c.maybeShow()}}}},maybeShow:function(){var b=this,a=b.getOwner();if(!a.isVisible(true)){b.showNext=true}else{if(b.loading&&a.rendered){b.show()}}},getMaskEl:function(){var a=this;return a.maskEl||(a.maskEl=a.el.insertSibling({cls:a.maskCls,style:{zIndex:a.el.getStyle("zIndex")-2}},"before"))},onShow:function(){var b=this,a=b.msgEl;b.callParent(arguments);b.loading=true;if(b.useMsg){a.show();b.msgTextEl.update(b.msg)}else{a.parent().hide()}},hide:function(){if(this.isElement){this.ownerCt.unmask();this.fireEvent("hide",this);return}delete this.showNext;return this.callParent(arguments)},onHide:function(){this.callParent();this.getMaskEl().hide()},show:function(){if(this.isElement){this.ownerCt.mask(this.useMsg?this.msg:"",this.msgCls);this.fireEvent("show",this);return}return this.callParent(arguments)},afterShow:function(){this.callParent(arguments);this.sizeMask()},setZIndex:function(b){var c=this,a=c.activeOwner;if(a){b=parseInt(a.el.getStyle("zIndex"),10)+1}c.getMaskEl().setStyle("zIndex",b-1);return c.mixins.floating.setZIndex.apply(c,arguments)},onLoad:function(){this.loading=false;this.hide()},onDestroy:function(){var a=this;if(a.isElement){a.ownerCt.unmask()}Ext.destroy(a.maskEl);a.callParent()}});Ext.define("Ext.data.association.Association",{alternateClassName:"Ext.data.Association",primaryKey:"id",associationKeyFunction:null,defaultReaderType:"json",isAssociation:true,initialConfig:null,statics:{AUTO_ID:1000,create:function(a){if(Ext.isString(a)){a={type:a}}switch(a.type){case"belongsTo":return new Ext.data.association.BelongsTo(a);case"hasMany":return new Ext.data.association.HasMany(a);case"hasOne":return new Ext.data.association.HasOne(a);default:}return a}},constructor:function(d){Ext.apply(this,d);var h=this,g=Ext.ModelManager.types,j=d.ownerModel,a=d.associatedModel,e=g[j],i=g[a],b=d.associationKey,c;if(b){c=String(b).search(/[\[\.]/);if(c>=0){h.associationKeyFunction=Ext.functionFactory("obj","return obj"+(c>0?".":"")+b)}}h.initialConfig=d;h.ownerModel=e;h.associatedModel=i;Ext.applyIf(h,{ownerName:j,associatedName:a});h.associationId="association"+(++h.statics().AUTO_ID)},getReader:function(){var c=this,a=c.reader,b=c.associatedModel;if(a){if(Ext.isString(a)){a={type:a}}if(a.isReader){a.setModel(b)}else{Ext.applyIf(a,{model:b,type:c.defaultReaderType})}c.reader=Ext.createByAlias("reader."+a.type,a)}return c.reader||null}});Ext.define("Ext.ModelManager",{extend:Ext.AbstractManager,alternateClassName:"Ext.ModelMgr",singleton:true,typeName:"mtype",associationStack:[],registerType:function(c,b){var d=b.prototype,a;if(d&&d.isModel){a=b}else{if(!b.extend){b.extend="Ext.data.Model"}a=Ext.define(c,b)}this.types[c]=a;return a},onModelDefined:function(c){var a=this.associationStack,g=a.length,e=[],b,d,h;for(d=0;d<g;d++){b=a[d];if(b.associatedModel==c.modelName){e.push(b)}}for(d=0,g=e.length;d<g;d++){h=e[d];this.types[h.ownerModel].prototype.associations.add(Ext.data.association.Association.create(h));Ext.Array.remove(a,h)}},registerDeferredAssociation:function(a){this.associationStack.push(a)},getModel:function(b){var a=b;if(typeof a=="string"){a=this.types[a]}return a},create:function(b,a,d){var c=typeof a=="function"?a:this.types[a||b.name];return new c(b,d)}},function(){Ext.regModel=function(){return this.ModelManager.registerType.apply(this.ModelManager,arguments)}});Ext.define("Ext.layout.component.ProgressBar",{alias:["layout.progressbar"],extend:Ext.layout.component.Auto,type:"progressbar",beginLayout:function(d){var b=this,a,c;b.callParent(arguments);if(!d.textEls){c=b.owner.textEl;if(c.isComposite){d.textEls=[];c=c.elements;for(a=c.length;a--;){d.textEls[a]=d.getEl(Ext.get(c[a]))}}else{d.textEls=[d.getEl("textEl")]}}},calculate:function(e){var c=this,a,d,b;c.callParent(arguments);if(Ext.isNumber(b=e.getProp("width"))){b-=e.getBorderInfo().width;d=e.textEls;for(a=d.length;a--;){d[a].setWidth(b)}}else{c.done=false}}});Ext.define("Ext.ProgressBar",{extend:Ext.Component,alias:"widget.progressbar",baseCls:Ext.baseCSSPrefix+"progress",animate:false,text:"",waitTimer:null,childEls:["bar"],renderTpl:['<tpl if="internalText">','<div class="{baseCls}-text {baseCls}-text-back">{text}</div>',"</tpl>",'<div id="{id}-bar" class="{baseCls}-bar {baseCls}-bar-{ui}" style="width:{percentage}%">','<tpl if="internalText">','<div class="{baseCls}-text">',"<div>{text}</div>","</div>","</tpl>","</div>"],componentLayout:"progressbar",initComponent:function(){this.callParent();this.addEvents("update")},initRenderData:function(){var a=this;return Ext.apply(a.callParent(),{internalText:!a.hasOwnProperty("textEl"),text:a.text||"&#160;",percentage:a.value?a.value*100:0})},onRender:function(){var a=this;a.callParent(arguments);if(a.textEl){a.textEl=Ext.get(a.textEl);a.updateText(a.text)}else{a.textEl=a.el.select("."+a.baseCls+"-text")}},updateProgress:function(d,e,a){var c=this,b=c.value;c.value=d||0;if(e){c.updateText(e)}if(c.rendered&&!c.isDestroyed){if(a===true||(a!==false&&c.animate)){c.bar.stopAnimation();c.bar.animate(Ext.apply({from:{width:(b*100)+"%"},to:{width:(c.value*100)+"%"}},c.animate))}else{c.bar.setStyle("width",(c.value*100)+"%")}}c.fireEvent("update",c,c.value,e);return c},updateText:function(b){var a=this;a.text=b;if(a.rendered){a.textEl.update(a.text)}return a},applyText:function(a){this.updateText(a)},getText:function(){return this.text},wait:function(c){var b=this,a;if(!b.waitTimer){a=b;c=c||{};b.updateText(c.text);b.waitTimer=Ext.TaskManager.start({run:function(d){var e=c.increment||10;d-=1;b.updateProgress(((((d+e)%e)+1)*(100/e))*0.01,null,c.animate)},interval:c.interval||1000,duration:c.duration,onStop:function(){if(c.fn){c.fn.apply(c.scope||b)}b.reset()},scope:a})}return b},isWaiting:function(){return this.waitTimer!==null},reset:function(a){var b=this;b.updateProgress(0);b.clearTimer();if(a===true){b.hide()}return b},clearTimer:function(){var a=this;if(a.waitTimer){a.waitTimer.onStop=null;Ext.TaskManager.stop(a.waitTimer);a.waitTimer=null}},onDestroy:function(){var b=this,a=b.bar;b.clearTimer();if(b.rendered){if(b.textEl.isComposite){b.textEl.clear()}Ext.destroyMembers(b,"textEl","progressBar");if(a&&b.animate){a.stopAnimation()}}b.callParent()}});Ext.define("Ext.ShadowPool",{singleton:true,markup:(function(){return Ext.String.format('<div class="{0}{1}-shadow" role="presentation"></div>',Ext.baseCSSPrefix,Ext.isIE&&!Ext.supports.CSS3BoxShadow?"ie":"css")}()),shadows:[],pull:function(){var a=this.shadows.shift();if(!a){a=Ext.get(Ext.DomHelper.insertHtml("beforeBegin",document.body.firstChild,this.markup));a.autoBoxAdjust=false}return a},push:function(a){this.shadows.push(a)},reset:function(){var c=[].concat(this.shadows),b,a=c.length;for(b=0;b<a;b++){c[b].remove()}this.shadows=[]}});Ext.define("Ext.Shadow",{localXYNames:{get:"getLocalXY",set:"setLocalXY"},constructor:function(b){var c=this,d,e,a;Ext.apply(c,b);if(!Ext.isString(c.mode)){c.mode=c.defaultMode}e=c.offset;a=Math.floor(e/2);c.opacity=50;switch(c.mode.toLowerCase()){case"drop":if(Ext.supports.CSS3BoxShadow){d={t:e,l:e,h:-e,w:-e}}else{d={t:-a,l:-a,h:-a,w:-a}}break;case"sides":if(Ext.supports.CSS3BoxShadow){d={t:e,l:0,h:-e,w:0}}else{d={t:-(1+a),l:1+a-2*e,h:-1,w:a-1}}break;case"frame":if(Ext.supports.CSS3BoxShadow){d={t:0,l:0,h:0,w:0}}else{d={t:1+a-2*e,l:1+a-2*e,h:e-a-1,w:e-a-1}}break;case"bottom":if(Ext.supports.CSS3BoxShadow){d={t:e,l:0,h:-e,w:0}}else{d={t:e,l:0,h:0,w:0}}break}c.adjusts=d},getShadowSize:function(){var b=this,d=b.el?b.offset:0,a=[d,d,d,d],c=b.mode.toLowerCase();if(b.el&&c!=="frame"){a[0]=0;if(c=="drop"){a[3]=0}}return a},offset:4,defaultMode:"drop",boxShadowProperty:(function(){var b="boxShadow",a=document.documentElement.style;if(!("boxShadow" in a)){if("WebkitBoxShadow" in a){b="WebkitBoxShadow"}else{if("MozBoxShadow" in a){b="MozBoxShadow"}}}return b}()),show:function(d){var b=this,a,c;d=Ext.get(d);a=(parseInt(d.getStyle("z-index"),10)-1)||0;c=d[b.localXYNames.get]();if(!b.el){b.el=Ext.ShadowPool.pull();if(b.fixed){b.el.dom.style.position="fixed"}else{b.el.dom.style.position=""}if(b.el.dom.nextSibling!=d.dom){b.el.insertBefore(d)}}b.el.setStyle("z-index",b.zIndex||a);if(Ext.isIE&&!Ext.supports.CSS3BoxShadow){b.el.dom.style.filter="progid:DXImageTransform.Microsoft.alpha(opacity="+b.opacity+") progid:DXImageTransform.Microsoft.Blur(pixelradius="+(b.offset)+")"}b.realign(c[0],c[1],d.dom.offsetWidth,d.dom.offsetHeight);b.el.dom.style.display="block"},isVisible:function(){return this.el?true:false},realign:function(c,m,j,g){if(!this.el){return}var b=this.adjusts,a=this.el,i=a.dom.style,d,e,h,k;a[this.localXYNames.set](c+b.l,m+b.t);d=Math.max(j+b.w,0);e=Math.max(g+b.h,0);h=d+"px";k=e+"px";if(i.width!=h||i.height!=k){i.width=h;i.height=k;if(Ext.supports.CSS3BoxShadow){i[this.boxShadowProperty]="0 0 "+(this.offset+2)+"px #888"}}},hide:function(){var a=this;if(a.el){a.el.dom.style.display="none";Ext.ShadowPool.push(a.el);delete a.el}},setZIndex:function(a){this.zIndex=a;if(this.el){this.el.setStyle("z-index",a)}},setOpacity:function(a){if(this.el){if(Ext.isIE&&!Ext.supports.CSS3BoxShadow){a=Math.floor(a*100/2)/100}this.opacity=a;this.el.setOpacity(a)}}});Ext.define("Ext.app.EventDomain",{statics:{instances:{}},isEventDomain:true,constructor:function(){var a=this;Ext.app.EventDomain.instances[a.type]=a;a.bus={};a.monitoredClasses=[]},dispatch:function(g,m,k){var l=this,h=l.bus,n=h[m],d,c,b,o,a,e,j;if(!n){return true}for(d in n){if(n.hasOwnProperty(d)&&l.match(g,d)){c=n[d];for(b in c){if(c.hasOwnProperty(b)){o=c[b];for(e=0,j=o.length;e<j;e++){a=o[e];if(a.fire.apply(a,k)===false){return false}}}}}}return true},listen:function(n,g){var l=this,j=l.bus,q=l.idProperty,p=l.monitoredClasses,e=p.length,d,s,h,c,r,b,o,a,k,m;for(c in n){if(n.hasOwnProperty(c)&&(k=n[c])){if(q){c=c==="*"?c:c.substring(1)}for(m in k){if(k.hasOwnProperty(m)){r=null;b=k[m];o=g;a=new Ext.util.Event(g,m);if(Ext.isObject(b)){r=b;b=r.fn;o=r.scope||g;delete r.fn;delete r.scope}if(typeof b==="string"){b=o[b]}a.addListener(b,o,r);for(d=e;d-->0;){p[d].hasListeners._incr_(m)}s=j[m]||(j[m]={});s=s[c]||(s[c]={});h=s[g.id]||(s[g.id]=[]);h.push(a)}}}}},match:function(c,a){var b=this.idProperty;if(b){return a==="*"||c[b]===a}return false},monitor:function(d){var b=this,a=d.isInstance?d:d.prototype,c=a.fireEventArgs;b.monitoredClasses.push(d);a.fireEventArgs=function(h,g){var e=c.apply(this,arguments);if(e!==false){e=b.dispatch(this,h,g)}return e}},unlisten:function(e){var b=this.bus,g,d,a,c;for(d in b){if(b.hasOwnProperty(d)&&(c=b[d])){for(a in c){g=c[a];delete g[e]}}}}});Ext.define("Ext.app.domain.Component",{extend:Ext.app.EventDomain,singleton:true,type:"component",constructor:function(){var a=this;a.callParent();a.monitor(Ext.Component)},match:function(b,a){return b.is(a)}});Ext.define("Ext.app.EventBus",{singleton:true,constructor:function(){var b=this,a=Ext.app.EventDomain.instances;b.callParent();b.domains=a;b.bus=a.component.bus},control:function(b,a){return this.domains.component.listen(b,a)},listen:function(d,b){var a=this.domains,c;for(c in d){if(d.hasOwnProperty(c)){a[c].listen(d[c],b)}}},unlisten:function(c){var a=Ext.app.EventDomain.instances,b;for(b in a){a[b].unlisten(c)}}});Ext.define("Ext.data.StoreManager",{extend:Ext.util.MixedCollection,alternateClassName:["Ext.StoreMgr","Ext.data.StoreMgr","Ext.StoreManager"],singleton:true,register:function(){for(var a=0,b;(b=arguments[a]);a++){this.add(b)}},unregister:function(){for(var a=0,b;(b=arguments[a]);a++){this.remove(this.lookup(b))}},lookup:function(c){if(Ext.isArray(c)){var b=["field1"],e=!Ext.isArray(c[0]),g=c,d,a;if(e){g=[];for(d=0,a=c.length;d<a;++d){g.push([c[d]])}}else{for(d=2,a=c[0].length;d<=a;++d){b.push("field"+d)}}return new Ext.data.ArrayStore({data:g,fields:b,autoDestroy:true,autoCreated:true,expanded:e})}if(Ext.isString(c)){return this.get(c)}else{return Ext.data.AbstractStore.create(c)}},getKey:function(a){return a.storeId}},function(){Ext.regStore=function(c,b){var a;if(Ext.isObject(c)){b=c}else{b.storeId=c}if(b instanceof Ext.data.Store){a=b}else{a=new Ext.data.Store(b)}return Ext.data.StoreManager.register(a)};Ext.getStore=function(a){return Ext.data.StoreManager.lookup(a)}});Ext.define("Ext.app.domain.Global",{extend:Ext.app.EventDomain,singleton:true,type:"global",constructor:function(){var a=this;a.callParent();a.monitor(Ext.globalEvents)},listen:function(b,a){this.callParent([{global:b},a])},match:function(){return true}});Ext.define("Ext.data.ResultSet",{loaded:true,count:0,total:0,success:false,constructor:function(a){Ext.apply(this,a);this.totalRecords=this.total;if(a.count===undefined){this.count=this.records.length}}});Ext.define("Ext.data.reader.Reader",{alternateClassName:["Ext.data.Reader","Ext.data.DataReader"],mixins:{observable:Ext.util.Observable},totalProperty:"total",successProperty:"success",root:"",implicitIncludes:true,readRecordsOnFailure:true,isReader:true,applyDefaults:true,lastFieldGeneration:null,constructor:function(a){var b=this;b.mixins.observable.constructor.call(b,a);b.fieldCount=0;b.model=Ext.ModelManager.getModel(b.model);b.accessExpressionFn=Ext.Function.bind(b.createFieldAccessExpression,b);if(b.model&&b.model.prototype.fields){b.buildExtractors()}this.addEvents("exception")},setModel:function(a,c){var b=this;b.model=Ext.ModelManager.getModel(a);if(a){b.buildExtractors(true)}if(c&&b.proxy){b.proxy.setModel(b.model,true)}},read:function(a){var b;if(a){b=a.responseText?this.getResponseData(a):this.readRecords(a)}return b||this.nullResultSet},readRecords:function(c){var d=this,i,b,a,g,e,h,j;if(d.lastFieldGeneration!==d.model.prototype.fields.generation){d.buildExtractors(true)}d.rawData=c;c=d.getData(c);i=true;b=0;a=[];if(d.successProperty){h=d.getSuccess(c);if(h===false||h==="false"){i=false}}if(d.messageProperty){j=d.getMessage(c)}if(d.readRecordsOnFailure||i){g=Ext.isArray(c)?c:d.getRoot(c);if(g){e=g.length}if(d.totalProperty){h=parseInt(d.getTotal(c),10);if(!isNaN(h)){e=h}}if(g){a=d.extractData(g);b=a.length}}return new Ext.data.ResultSet({total:e||b,count:b,records:a,success:i,message:j})},extractData:function(k){var j=this,b=j.model,a=k.length,d=new Array(a),e,c,h,g;if(!k.length&&Ext.isObject(k)){k=[k];a=1}for(g=0;g<a;g++){c=k[g];if(c.isModel){d[g]=c}else{d[g]=h=new b(undefined,j.getId(c),c,e={});h.phantom=false;j.convertRecordData(e,c,h);if(j.implicitIncludes&&h.associations.length){j.readAssociated(h,c)}}}return d},readAssociated:function(h,e){var d=h.associations.items,g=0,a=d.length,c,b,k,j;for(;g<a;g++){c=d[g];b=this.getAssociatedDataRoot(e,c.associationKeyFunction||c.associationKey||c.name);if(b){j=c.getReader();if(!j){k=c.associatedModel.getProxy();if(k){j=k.getReader()}else{j=new this.constructor({model:c.associatedName})}}c.read(h,j,b)}}},getAssociatedDataRoot:function(b,a){if(Ext.isFunction(a)){return a(b)}return b[a]},getFields:function(){return this.model.prototype.fields.items},getData:Ext.identityFn,getRoot:Ext.identityFn,getResponseData:function(a){},onMetaChange:function(e){var d=this,b=e.fields||d.getFields(),c,a;d.metaData=e;d.root=e.root||d.root;d.idProperty=e.idProperty||d.idProperty;d.totalProperty=e.totalProperty||d.totalProperty;d.successProperty=e.successProperty||d.successProperty;d.messageProperty=e.messageProperty||d.messageProperty;a=e.clientIdProperty;if(d.model){d.model.setFields(b,d.idProperty,a);d.setModel(d.model,true)}else{c=Ext.define("Ext.data.reader.Json-Model"+Ext.id(),{extend:"Ext.data.Model",fields:b,clientIdProperty:a});if(d.idProperty){c.idProperty=d.idProperty}d.setModel(c,true)}},getIdProperty:function(){var b=this.model.prototype.idField,a=this.idProperty;if(!a&&b&&(a=b.mapping)==null){a=b.name}return a},buildExtractors:function(e){var c=this,h=c.getIdProperty(),d=c.totalProperty,b=c.successProperty,g=c.messageProperty,a;if(e===true){delete c.convertRecordData}if(c.convertRecordData){return}if(d){c.getTotal=c.createAccessor(d)}if(b){c.getSuccess=c.createAccessor(b)}if(g){c.getMessage=c.createAccessor(g)}if(h){a=c.createAccessor(h);c.getId=function(i){var j=a.call(c,i);return(j===undefined||j==="")?null:j}}else{c.getId=function(){return null}}c.convertRecordData=c.buildRecordDataExtractor();c.lastFieldGeneration=c.model.prototype.fields.generation},recordDataExtractorTemplate:["var me = this\n","    ,fields = me.model.prototype.fields\n","    ,value\n","    ,internalId\n",'<tpl for="fields">','    ,__field{#} = fields.map["{name}"]\n',"</tpl>",";\n","return function(dest, source, record) {\n",'<tpl for="fields">','{% var fieldAccessExpression =  this.createFieldAccessExpression(values, "__field" + xindex, "source");',"   if (fieldAccessExpression) { %}",'    value = {[ this.createFieldAccessExpression(values, "__field" + xindex, "source") ]};\n','<tpl if="hasCustomConvert">','    dest["{name}"] = value === undefined ? __field{#}.convert(__field{#}.defaultValue, record) : __field{#}.convert(value, record);\n','<tpl elseif="defaultValue !== undefined">',"    if (value === undefined) {\n","        if (me.applyDefaults) {\n",'<tpl if="convert">','            dest["{name}"] = __field{#}.convert(__field{#}.defaultValue, record);\n',"<tpl else>",'            dest["{name}"] = __field{#}.defaultValue\n',"</tpl>","        };\n","    } else {\n",'<tpl if="convert">','        dest["{name}"] = __field{#}.convert(value, record);\n',"<tpl else>",'        dest["{name}"] = value;\n',"</tpl>","    };\n","<tpl else>","    if (value !== undefined) {\n",'<tpl if="convert">','        dest["{name}"] = __field{#}.convert(value, record);\n',"<tpl else>",'        dest["{name}"] = value;\n',"</tpl>","    }\n","</tpl>","{% } else { %}",'<tpl if="defaultValue !== undefined">','<tpl if="convert">','    dest["{name}"] = __field{#}.convert(__field{#}.defaultValue, record);\n',"<tpl else>",'    dest["{name}"] = __field{#}.defaultValue\n',"</tpl>","</tpl>","{% } %}","</tpl>",'<tpl if="clientIdProp">','    if (record && (internalId = {[ this.createFieldAccessExpression({mapping: values.clientIdProp}, null, "source") ]})) {\n','        record.{["internalId"]} = internalId;\n',"    }\n","</tpl>","};"],buildRecordDataExtractor:function(){var c=this,a=c.model.prototype,b={clientIdProp:a.clientIdProperty,fields:a.fields.items};c.recordDataExtractorTemplate.createFieldAccessExpression=c.accessExpressionFn;return Ext.functionFactory(c.recordDataExtractorTemplate.apply(b)).call(c)},destroyReader:function(){var a=this;delete a.proxy;delete a.model;delete a.convertRecordData;delete a.getId;delete a.getTotal;delete a.getSuccess;delete a.getMessage}},function(){var a=this.prototype;Ext.apply(a,{nullResultSet:new Ext.data.ResultSet({total:0,count:0,records:[],success:true,message:""}),recordDataExtractorTemplate:new Ext.XTemplate(a.recordDataExtractorTemplate)})});Ext.define("Ext.data.reader.Json",{extend:Ext.data.reader.Reader,alternateClassName:"Ext.data.JsonReader",alias:"reader.json",root:"",metaProperty:"metaData",useSimpleAccessors:false,readRecords:function(b){var a=this,c;if(a.getMeta){c=a.getMeta(b);if(c){a.onMetaChange(c)}}else{if(b.metaData){a.onMetaChange(b.metaData)}}a.jsonData=b;return a.callParent([b])},getResponseData:function(a){var d,b;try{d=Ext.decode(a.responseText);return this.readRecords(d)}catch(c){b=new Ext.data.ResultSet({total:0,count:0,records:[],success:false,message:c.message});this.fireEvent("exception",this,a,b);Ext.Logger.warn("Unable to parse the JSON returned by the server");return b}},buildExtractors:function(){var b=this,a=b.metaProperty;b.callParent(arguments);if(b.root){b.getRoot=b.createAccessor(b.root)}else{b.getRoot=Ext.identityFn}if(a){b.getMeta=b.createAccessor(a)}},extractData:function(a){var e=this.record,d=[],c,b;if(e){c=a.length;if(!c&&Ext.isObject(a)){c=1;a=[a]}for(b=0;b<c;b++){d[b]=a[b][e]}}else{d=a}return this.callParent([d])},createAccessor:(function(){var a=/[\[\.]/;return function(c){if(Ext.isEmpty(c)){return Ext.emptyFn}if(Ext.isFunction(c)){return c}if(this.useSimpleAccessors!==true){var b=String(c).search(a);if(b>=0){return Ext.functionFactory("obj","return obj"+(b>0?".":"")+c)}}return function(d){return d[c]}}}()),createFieldAccessExpression:(function(){var a=/[\[\.]/;return function(o,d,e){var b=o.mapping,m=b||b===0,c=m?b:o.name,p,g;if(b===false){return}if(typeof c==="function"){p=d+".mapping("+e+", this)"}else{if(this.useSimpleAccessors===true||((g=String(c).search(a))<0)){if(!m||isNaN(c)){c='"'+c+'"'}p=e+"["+c+"]"}else{if(g===0){p=e+c}else{var j=c.split("."),l=j.length,k=1,n=e+"."+j[0],h=[n];for(;k<l;k++){n+="."+j[k];h.push(n)}p=h.join(" && ")}}}return p}}())});Ext.define("Ext.data.writer.Writer",{alias:"writer.base",alternateClassName:["Ext.data.DataWriter","Ext.data.Writer"],writeAllFields:true,nameProperty:"name",writeRecordId:true,isWriter:true,constructor:function(a){Ext.apply(this,a)},write:function(e){var c=e.operation,b=c.records||[],a=b.length,d=0,g=[];for(;d<a;d++){g.push(this.getRecordData(b[d],c))}return this.writeRecords(e,g)},getRecordData:function(d,b){var m=d.phantom===true,a=this.writeAllFields||m,g=d.fields,o=g.items,c={},k=d.clientIdProperty,j,i,n,l,e,h,p;if(a){p=o.length;for(h=0;h<p;h++){i=o[h];if(i.persist){this.writeValue(c,i,d)}}}else{j=d.getChanges();for(n in j){if(j.hasOwnProperty(n)){i=g.get(n);if(i.persist){this.writeValue(c,i,d)}}}}if(m){if(k&&b&&b.records.length>1){c[k]=d.internalId}}else{if(this.writeRecordId){e=g.get(d.idProperty)[this.nameProperty]||d.idProperty;c[e]=d.getId()}}return c},writeValue:function(e,g,b){var c=g[this.nameProperty]||g.name,a=this.dateFormat||g.dateWriteFormat||g.dateFormat,d=b.get(g.name);if(g.serialize){e[c]=g.serialize(d,b)}else{if(g.type===Ext.data.Types.DATE&&a&&Ext.isDate(d)){e[c]=Ext.Date.format(d,a)}else{e[c]=d}}}});Ext.define("Ext.data.writer.Json",{extend:Ext.data.writer.Writer,alternateClassName:"Ext.data.JsonWriter",alias:"writer.json",root:undefined,encode:false,allowSingle:true,expandData:false,getExpandedData:function(d){var b=d.length,e=0,k,a,g,c,h,l=function(i,j){var m={};m[i]=j;return m};for(;e<b;e++){k=d[e];for(a in k){if(k.hasOwnProperty(a)){g=a.split(".");c=g.length-1;if(c>0){h=k[a];for(;c>0;c--){h=l(g[c],h)}k[g[0]]=k[g[0]]||{};Ext.Object.merge(k[g[0]],h);delete k[a]}}}}return d},writeRecords:function(b,c){var a=this.root;if(this.expandData){c=this.getExpandedData(c)}if(this.allowSingle&&c.length===1){c=c[0]}if(this.encode){if(a){b.params[a]=Ext.encode(c)}else{}}else{b.jsonData=b.jsonData||{};if(a){b.jsonData[a]=c}else{b.jsonData=c}}return b}});Ext.define("Ext.data.proxy.Proxy",{alias:"proxy.proxy",alternateClassName:["Ext.data.DataProxy","Ext.data.Proxy"],mixins:{observable:Ext.util.Observable},batchOrder:"create,update,destroy",batchActions:true,defaultReaderType:"json",defaultWriterType:"json",isProxy:true,constructor:function(a){var b=this;a=a||{};b.proxyConfig=a;b.mixins.observable.constructor.call(b,a);if(b.model!==undefined&&!(b.model instanceof Ext.data.Model)){b.setModel(b.model)}else{if(b.reader){b.setReader(b.reader)}if(b.writer){b.setWriter(b.writer)}}},setModel:function(a,b){var c=this;c.model=Ext.ModelManager.getModel(a);c.setReader(this.reader);c.setWriter(this.writer);if(b&&c.store){c.store.setModel(c.model)}},getModel:function(){return this.model},setReader:function(a){var c=this,b=true,d=c.reader;if(a===undefined||typeof a=="string"){a={type:a};b=false}if(a.isReader){a.setModel(c.model)}else{if(b){a=Ext.apply({},a)}Ext.applyIf(a,{proxy:c,model:c.model,type:c.defaultReaderType});a=Ext.createByAlias("reader."+a.type,a)}if(a!==d&&a.onMetaChange){a.onMetaChange=Ext.Function.createSequence(a.onMetaChange,this.onMetaChange,this)}c.reader=a;return c.reader},getReader:function(){return this.reader},onMetaChange:function(a){this.fireEvent("metachange",this,a)},setWriter:function(c){var b=this,a=true;if(c===undefined||typeof c=="string"){c={type:c};a=false}if(!c.isWriter){if(a){c=Ext.apply({},c)}Ext.applyIf(c,{model:b.model,type:b.defaultWriterType});c=Ext.createByAlias("writer."+c.type,c)}b.writer=c;return b.writer},getWriter:function(){return this.writer},create:Ext.emptyFn,read:Ext.emptyFn,update:Ext.emptyFn,destroy:Ext.emptyFn,batch:function(o,l){var k=this,j=k.batchActions,h,c,g,d,e,m,b,n,i;if(o.operations===undefined){o={operations:o,listeners:l}}if(o.batch){if(Ext.isDefined(o.batch.runOperation)){h=Ext.applyIf(o.batch,{proxy:k,listeners:{}})}}else{o.batch={proxy:k,listeners:o.listeners||{}}}if(!h){h=new Ext.data.Batch(o.batch)}h.on("complete",Ext.bind(k.onBatchComplete,k,[o],0));g=k.batchOrder.split(",");d=g.length;for(m=0;m<d;m++){e=g[m];c=o.operations[e];if(c){if(j){h.add(new Ext.data.Operation({action:e,records:c}))}else{n=c.length;for(b=0;b<n;b++){i=c[b];h.add(new Ext.data.Operation({action:e,records:[i]}))}}}}h.start();return h},onBatchComplete:function(a,b){var c=a.scope||this;if(b.hasException){if(Ext.isFunction(a.failure)){Ext.callback(a.failure,c,[b,a])}}else{if(Ext.isFunction(a.success)){Ext.callback(a.success,c,[b,a])}}if(Ext.isFunction(a.callback)){Ext.callback(a.callback,c,[b,a])}},clone:function(){return new this.self(this.proxyConfig)}});Ext.define("Ext.data.Operation",{synchronous:true,action:undefined,filters:undefined,sorters:undefined,groupers:undefined,start:undefined,limit:undefined,batch:undefined,callback:undefined,scope:undefined,started:false,running:false,complete:false,success:undefined,exception:false,error:undefined,actionCommitRecordsRe:/^(?:create|update)$/i,actionSkipSyncRe:/^destroy$/i,constructor:function(a){Ext.apply(this,a||{})},commitRecords:function(n){var j=this,m=j.actionCommitRecordsRe.test(j.action),l,h,a,e,b,d,g,k,c;if(!j.actionSkipSyncRe.test(j.action)){a=j.records;if(a&&a.length){if(m){c=[]}if(a.length>1){if(j.action=="update"||a[0].clientIdProperty){l=new Ext.util.MixedCollection();l.addAll(n);for(h=a.length;h--;){b=a[h];e=l.findBy(j.matchClientRec,b);k=b.copyFrom(e);if(m){c.push(k)}}}else{for(d=0,g=a.length;d<g;++d){b=a[d];e=n[d];if(b&&e){k=j.updateRecord(b,e);if(m){c.push(k)}}}}}else{k=j.updateRecord(a[0],n[0]);if(m){c[0]=k}}if(m){for(h=a.length;h--;){a[h].commit(false,c[h])}}}}},updateRecord:function(a,b){if(b&&(a.phantom||a.getId()===b.getId())){return a.copyFrom(b)}return[]},matchClientRec:function(c){var a=this,b=a.getId();if(b&&c.getId()===b){return true}return c.internalId===a.internalId},setStarted:function(){this.started=true;this.running=true},setCompleted:function(){this.complete=true;this.running=false},setSuccessful:function(){this.success=true},setException:function(a){this.exception=true;this.success=false;this.running=false;this.error=a},hasException:function(){return this.exception===true},getError:function(){return this.error},getRecords:function(){var a=this.getResultSet();return this.records||(a?a.records:null)},getResultSet:function(){return this.resultSet},isStarted:function(){return this.started===true},isRunning:function(){return this.running===true},isComplete:function(){return this.complete===true},wasSuccessful:function(){return this.isComplete()&&this.success===true},setBatch:function(a){this.batch=a},allowWrite:function(){return this.action!="read"}});Ext.define("Ext.data.AbstractStore",{mixins:{observable:Ext.util.Observable,sortable:Ext.util.Sortable},statics:{create:function(a){if(!a.isStore){if(!a.type){a.type="store"}a=Ext.createByAlias("store."+a.type,a)}return a}},onClassExtended:function(b,d,a){var c=d.model,e;if(typeof c=="string"){e=a.onBeforeCreated;a.onBeforeCreated=function(){var h=this,g=arguments;Ext.require(c,function(){e.apply(h,g)})}}},remoteSort:false,remoteFilter:false,autoLoad:undefined,autoSync:false,batchUpdateMode:"operation",filterOnLoad:true,sortOnLoad:true,implicitModel:false,defaultProxyType:"memory",isDestroyed:false,isStore:true,sortRoot:"data",constructor:function(a){var c=this,b;Ext.apply(c,a);c.removed=[];c.mixins.observable.constructor.apply(c,arguments);c.model=Ext.ModelManager.getModel(c.model);Ext.applyIf(c,{modelDefaults:null});if(!c.model&&c.fields){c.model=Ext.define("Ext.data.Store.ImplicitModel-"+(c.storeId||Ext.id()),{extend:"Ext.data.Model",fields:c.fields,proxy:c.proxy||c.defaultProxyType});delete c.fields;c.implicitModel=true}c.setProxy(c.proxy||c.model.getProxy());c.proxy.on("metachange",c.onMetaChange,c);if(c.id&&!c.storeId){c.storeId=c.id;delete c.id}if(c.storeId){Ext.data.StoreManager.register(c)}c.mixins.sortable.initSortable.call(c);b=c.decodeFilters(c.filters);c.filters=new Ext.util.MixedCollection();c.filters.addAll(b)},setProxy:function(a){var b=this;if(a instanceof Ext.data.proxy.Proxy){a.setModel(b.model)}else{if(Ext.isString(a)){a={type:a}}Ext.applyIf(a,{model:b.model});a=Ext.createByAlias("proxy."+a.type,a)}b.proxy=a;return b.proxy},getProxy:function(){return this.proxy},onMetaChange:function(a,b){this.fireEvent("metachange",this,b)},create:function(e,c){var d=this,a=Ext.ModelManager.create(Ext.applyIf(e,d.modelDefaults),d.model.modelName),b;c=c||{};Ext.applyIf(c,{action:"create",records:[a]});b=new Ext.data.Operation(c);d.proxy.create(b,d.onProxyWrite,d);return a},read:function(){return this.load.apply(this,arguments)},update:function(b){var c=this,a;b=b||{};Ext.applyIf(b,{action:"update",records:c.getUpdatedRecords()});a=new Ext.data.Operation(b);return c.proxy.update(a,c.onProxyWrite,c)},onProxyWrite:function(b){var c=this,d=b.wasSuccessful(),a=b.getRecords();switch(b.action){case"create":c.onCreateRecords(a,b,d);break;case"update":c.onUpdateRecords(a,b,d);break;case"destroy":c.onDestroyRecords(a,b,d);break}if(d){c.fireEvent("write",c,b);c.fireEvent("datachanged",c);c.fireEvent("refresh",c)}Ext.callback(b.callback,b.scope||c,[a,b,d])},onCreateRecords:Ext.emptyFn,onUpdateRecords:Ext.emptyFn,onDestroyRecords:function(b,a,c){if(c){this.removed=[]}},destroy:function(b){var c=this,a;b=b||{};Ext.applyIf(b,{action:"destroy",records:c.getRemovedRecords()});a=new Ext.data.Operation(b);return c.proxy.destroy(a,c.onProxyWrite,c)},onBatchOperationComplete:function(b,a){return this.onProxyWrite(a)},onBatchComplete:function(c,a){var g=this,b=c.operations,e=b.length,d;g.suspendEvents();for(d=0;d<e;d++){g.onProxyWrite(b[d])}g.resumeEvents();g.fireEvent("datachanged",g);g.fireEvent("refresh",g)},onBatchException:function(b,a){},filterNew:function(a){return a.phantom===true&&a.isValid()},getNewRecords:function(){return[]},getUpdatedRecords:function(){return[]},getModifiedRecords:function(){return[].concat(this.getNewRecords(),this.getUpdatedRecords())},filterUpdated:function(a){return a.dirty===true&&a.phantom!==true&&a.isValid()},getRemovedRecords:function(){return this.removed},filter:function(a,b){},decodeFilters:function(e){if(!Ext.isArray(e)){if(e===undefined){e=[]}else{e=[e]}}var d=e.length,a=Ext.util.Filter,b,c;for(c=0;c<d;c++){b=e[c];if(!(b instanceof a)){Ext.apply(b,{root:"data"});if(b.fn){b.filterFn=b.fn}if(typeof b=="function"){b={filterFn:b}}e[c]=new a(b)}}return e},clearFilter:function(a){},isFiltered:function(){},filterBy:function(b,a){},sync:function(c){var e=this,b={},g=e.getNewRecords(),d=e.getUpdatedRecords(),a=e.getRemovedRecords(),h=false;if(g.length>0){b.create=g;h=true}if(d.length>0){b.update=d;h=true}if(a.length>0){b.destroy=a;h=true}if(h&&e.fireEvent("beforesync",b)!==false){c=c||{};e.proxy.batch(Ext.apply(c,{operations:b,listeners:e.getBatchListeners()}))}return e},getBatchListeners:function(){var b=this,a={scope:b,exception:b.onBatchException};if(b.batchUpdateMode=="operation"){a.operationcomplete=b.onBatchOperationComplete}else{a.complete=b.onBatchComplete}return a},save:function(){return this.sync.apply(this,arguments)},load:function(b){var c=this,a;b=Ext.apply({action:"read",filters:c.filters.items,sorters:c.getSorters()},b);c.lastOptions=b;a=new Ext.data.Operation(b);if(c.fireEvent("beforeload",c,a)!==false){c.loading=true;c.proxy.read(a,c.onProxyLoad,c)}return c},reload:function(a){return this.load(Ext.apply(this.lastOptions,a))},afterEdit:function(a,e){var d=this,b,c;if(d.autoSync&&!d.autoSyncSuspended){for(b=e.length;b--;){if(a.fields.get(e[b]).persist){c=true;break}}if(c){d.sync()}}d.onUpdate(a,Ext.data.Model.EDIT,e);d.fireEvent("update",d,a,Ext.data.Model.EDIT,e)},afterReject:function(a){this.onUpdate(a,Ext.data.Model.REJECT,null);this.fireEvent("update",this,a,Ext.data.Model.REJECT,null)},afterCommit:function(a,b){if(!b){b=null}this.onUpdate(a,Ext.data.Model.COMMIT,b);this.fireEvent("update",this,a,Ext.data.Model.COMMIT,b)},onUpdate:Ext.emptyFn,onIdChanged:function(c,d,b,a){this.fireEvent("idchanged",this,c,d,b,a)},destroyStore:function(){var a=this;if(!a.isDestroyed){a.clearListeners();if(a.storeId){Ext.data.StoreManager.unregister(a)}a.clearData();a.data=a.tree=a.sorters=a.filters=a.groupers=null;if(a.reader){a.reader.destroyReader()}a.proxy=a.reader=a.writer=null;a.isDestroyed=true;if(a.implicitModel){Ext.destroy(a.model)}else{a.model=null}}},getState:function(){var e=this,c,a,b=!!e.groupers,g=[],h=[],d=[];if(b){e.groupers.each(function(i){g[g.length]=i.serialize();c=true})}if(e.sorters){e.sorters.each(function(i){if(b&&!e.groupers.contains(i)){h[h.length]=i.serialize();c=true}})}if(e.filters&&e.statefulFilters){e.filters.each(function(i){d[d.length]=i.serialize();c=true})}if(c){a={};if(g.length){a.groupers=g}if(h.length){a.sorters=h}if(d.length){a.filters=d}return a}},applyState:function(g){var e=this,c=!!e.sorters,b=!!e.groupers,a=!!e.filters,d;if(b&&g.groupers){e.groupers.clear();e.groupers.addAll(e.decodeGroupers(g.groupers))}if(c&&g.sorters){e.sorters.clear();e.sorters.addAll(e.decodeSorters(g.sorters))}if(a&&g.filters){e.filters.clear();e.filters.addAll(e.decodeFilters(g.filters))}if(c&&b){e.sorters.insert(0,e.groupers.getRange())}if(e.remoteSort||e.remoteGroup||e.remoteFilter){e.reload()}if(a&&e.filters.length&&!e.remoteFilter){e.filter();d=e.sortOnFilter}if(c&&e.sorters.length&&!e.remoteSort&&!d){e.sort()}},doSort:function(a){var b=this;if(b.remoteSort){b.load()}else{b.data.sortBy(a);b.fireEvent("datachanged",b);b.fireEvent("refresh",b)}b.fireEvent("sort",b,b.sorters.getRange())},clearData:Ext.emptyFn,getCount:Ext.emptyFn,getById:Ext.emptyFn,removeAll:Ext.emptyFn,isLoading:function(){return !!this.loading},suspendAutoSync:function(){this.autoSyncSuspended=true},resumeAutoSync:function(){this.autoSyncSuspended=false}});Ext.define("Ext.app.domain.Store",{extend:Ext.app.EventDomain,singleton:true,type:"store",idProperty:"storeId",constructor:function(){var a=this;a.callParent();a.monitor(Ext.data.AbstractStore)}});Ext.define("Ext.app.Controller",{mixins:{observable:Ext.util.Observable},statics:{strings:{model:{getter:"getModel",upper:"Model"},view:{getter:"getView",upper:"View"},controller:{getter:"getController",upper:"Controller"},store:{getter:"getStore",upper:"Store"}},controllerRegex:/^(.*)\.controller\./,createGetter:function(a,b){return function(){return this[a](b)}},getGetterName:function(c,a){var d="get",e=c.split("."),g=e.length,b;for(b=0;b<g;b++){d+=Ext.String.capitalize(e[b])}d+=a;return d},processDependencies:function(q,r,c,d,i){if(!i||!i.length){return}var k=this,p=k.strings[d],b,n,m,a,e,g,l,h;for(e=0,g=i.length;e<g;e++){a=i[e];b=k.getFullName(a,d,c);n=b.absoluteName;m=b.shortName;r.push(n);l=k.getGetterName(m,p.upper);q[l]=h=k.createGetter(p.getter,a);if(d!=="controller"){h["Ext.app.getter"]=true}}},getFullName:function(c,e,d){var a=c,b,g;if((b=c.indexOf("@"))>0){a=c.substring(0,b);g=c.substring(b+1)+"."+a}else{if(c.indexOf(".")>0&&(Ext.ClassManager.isCreated(c)||Ext.Loader.isAClassNameWithAKnownPrefix(c))){g=c}else{if(d){g=d+"."+e+"."+c;a=c}else{g=c}}}return{absoluteName:g,shortName:a}}},application:null,onClassExtended:function(b,c,a){var d=a.onBeforeCreated;a.onBeforeCreated=function(m,h){var g=Ext.app.Controller,k=g.controllerRegex,n=[],l,e,n,j,i;j=m.prototype;l=Ext.getClassName(m);e=h.$namespace||Ext.app.getNamespace(l)||((i=k.exec(l))&&i[1]);if(e){j.$namespace=e}g.processDependencies(j,n,e,"model",h.models);g.processDependencies(j,n,e,"view",h.views);g.processDependencies(j,n,e,"store",h.stores);g.processDependencies(j,n,e,"controller",h.controllers);Ext.require(n,Ext.Function.pass(d,arguments,this))}},constructor:function(a){var b=this;b.mixins.observable.constructor.call(b,a);if(b.refs){b.ref(b.refs)}b.eventbus=Ext.app.EventBus;b.initAutoGetters()},initAutoGetters:function(){var b=this.self.prototype,c,a;for(c in b){a=b[c];if(a&&a["Ext.app.getter"]){a.call(this)}}},doInit:function(b){var a=this;if(!a._initialized){a.init(b);a._initialized=true}},init:Ext.emptyFn,onLaunch:Ext.emptyFn,ref:function(a){var g=this,b=0,e=a.length,h,d,c;a=Ext.Array.from(a);g.references=g.references||[];for(;b<e;b++){h=a[b];d=h.ref;c="get"+Ext.String.capitalize(d);if(!g[c]){g[c]=Ext.Function.pass(g.getRef,[d,h],g)}g.references.push(d.toLowerCase())}},addRef:function(a){this.ref(a)},getRef:function(d,g,a){var c=this,e=c.refCache||(c.refCache={}),b=e[d];g=g||{};a=a||{};Ext.apply(g,a);if(g.forceCreate){return Ext.ComponentManager.create(g,"component")}if(!b){if(g.selector){e[d]=b=Ext.ComponentQuery.query(g.selector)[0]}if(!b&&g.autoCreate){e[d]=b=Ext.ComponentManager.create(g,"component")}if(b){b.on("beforedestroy",function(){e[d]=null})}}return b},hasRef:function(b){var a=this.references;return a&&Ext.Array.indexOf(a,b.toLowerCase())!==-1},control:function(b,c,a){var d=this,e=a,g;if(Ext.isString(b)){g={};g[b]=c}else{g=b;e=c}d.eventbus.control(g,e||d)},listen:function(b,a){this.eventbus.listen(b,a||this)},getController:function(c){var a=this,b=a.application;if(c===a.id){return a}return b&&b.getController(c)},getStore:function(c){var a,b;a=(c.indexOf("@")==-1)?c:c.split("@")[0];b=Ext.StoreManager.get(a);if(!b){c=Ext.app.Controller.getFullName(c,"store",this.$namespace);if(c){b=Ext.create(c.absoluteName,{storeId:a})}}return b},getModel:function(b){var a=Ext.app.Controller.getFullName(b,"model",this.$namespace);return a&&Ext.ModelManager.getModel(a.absoluteName)},getView:function(a){var b=Ext.app.Controller.getFullName(a,"view",this.$namespace);return b&&Ext.ClassManager.get(b.absoluteName)},getApplication:function(){return this.application}});Ext.define("Ext.container.DockingContainer",{isDockingContainer:true,defaultDockWeights:{top:{render:1,visual:1},left:{render:3,visual:5},right:{render:5,visual:7},bottom:{render:7,visual:3}},dockOrder:{top:-1,left:-1,right:1,bottom:1},horizontalDocks:0,addDocked:function(a,g){var e=this,b=0,d,c;a=e.prepareItems(a);c=a.length;for(;b<c;b++){d=a[b];d.dock=d.dock||"top";if(d.dock==="left"||d.dock==="right"){e.horizontalDocks++}if(g!==undefined){b+=g;e.dockedItems.insert(b,d)}else{e.dockedItems.add(d)}d.onAdded(e,b);if(e.hasListeners.dockedadd){e.fireEvent("dockedadd",e,d,b)}if(e.onDockedAdd!==Ext.emptyFn){e.onDockedAdd(d)}}if(e.rendered&&!e.suspendLayout){e.updateLayout()}return a},destroyDockedItems:function(){var a=this.dockedItems,b;if(a){while((b=a.first())){this.removeDocked(b,true)}}},doRenderDockedItems:function(c,g,h){var e=g.$comp,d=e.componentLayout,b,a;if(d.getDockedItems&&!g.$skipDockedItems){b=d.getDockedItems("render",!h);a=b&&d.getItemsRenderTree(b);if(a){Ext.DomHelper.generateMarkup(a,c)}}},getDockedComponent:function(a){if(Ext.isObject(a)){a=a.getItemId()}return this.dockedItems.get(a)},getDockedItems:function(a,c){var b=this.getComponentLayout().getDockedItems("render",c);if(a&&b.length){b=Ext.ComponentQuery.query(a,b)}return b},getDockingRefItems:function(b,e){var a=b&&"*,* *",d=this.getDockedItems(a,true),c;d.push.apply(d,e);c=this.getDockedItems(a,false);d.push.apply(d,c);return d},initDockingItems:function(){var b=this,a=b.dockedItems;b.dockedItems=new Ext.util.AbstractMixedCollection(false,b.getComponentId);if(a){b.addDocked(a)}},insertDocked:function(b,a){this.addDocked(a,b)},onDockedAdd:Ext.emptyFn,onDockedRemove:Ext.emptyFn,removeDocked:function(e,b){var d=this,c,a;b=b===true||(b!==false&&d.autoDestroy);if(!d.dockedItems.contains(e)){return e}if(e.dock==="left"||e.dock==="right"){d.horizontalDocks--}c=d.componentLayout;a=c&&d.rendered;if(a){c.onRemove(e)}d.dockedItems.remove(e);e.onRemoved(e.destroying||b);d.onDockedRemove(e);if(b){e.destroy()}else{if(a){c.afterRemove(e)}}if(d.hasListeners.dockedremove){d.fireEvent("dockedremove",d,e)}if(!d.destroying&&!d.suspendLayout){d.updateLayout()}return e},setupDockingRenderTpl:function(a){a.renderDockedItems=this.doRenderDockedItems}});Ext.define("Ext.toolbar.Fill",{extend:Ext.Component,alias:"widget.tbfill",alternateClassName:"Ext.Toolbar.Fill",isFill:true,flex:1});Ext.define("Ext.layout.container.boxOverflow.None",{alternateClassName:"Ext.layout.boxOverflow.None",constructor:function(b,a){this.layout=b;Ext.apply(this,a)},handleOverflow:Ext.emptyFn,clearOverflow:Ext.emptyFn,beginLayout:Ext.emptyFn,beginLayoutCycle:Ext.emptyFn,calculate:function(b){var a=this,c=b.state.boxPlan,d;if(c&&c.tooNarrow){d=a.handleOverflow(b);if(d){if(d.reservedSpace){a.layout.publishInnerCtSize(b,d.reservedSpace)}}}else{a.clearOverflow()}},completeLayout:Ext.emptyFn,finishedLayout:function(d){var c=this,a=c.layout.owner,b,e;if(a.hasListeners.overflowchange){b=a.query(">[hidden]");e=b.length;if(e!==c.lastHiddenCount){a.fireEvent("overflowchange",c.lastHiddenCount,e,b);c.lastHiddenCount=e}}},onRemove:Ext.emptyFn,getItem:function(a){return this.layout.owner.getComponent(a)},getOwnerType:function(a){var b;if(a.isToolbar){b="toolbar"}else{if(a.isTabBar){b="tabbar"}else{if(a.isMenu){b="menu"}else{b=a.getXType()}}}return b},getPrefixConfig:Ext.emptyFn,getSuffixConfig:Ext.emptyFn,getOverflowCls:function(){return""}});Ext.define("Ext.toolbar.Item",{extend:Ext.Component,alias:"widget.tbitem",alternateClassName:"Ext.Toolbar.Item",enable:Ext.emptyFn,disable:Ext.emptyFn,focus:Ext.emptyFn});Ext.define("Ext.toolbar.Separator",{extend:Ext.toolbar.Item,alias:"widget.tbseparator",alternateClassName:"Ext.Toolbar.Separator",baseCls:Ext.baseCSSPrefix+"toolbar-separator",focusable:false,border:true});Ext.define("Ext.button.Manager",{singleton:true,alternateClassName:"Ext.ButtonToggleManager",groups:{},buttonSelector:"."+Ext.baseCSSPrefix+"btn",init:function(){var a=this;if(a.initialized){return}Ext.getBody().on("keydown",a.onKeyDown,a);a.initialized=true},onKeyDown:function(c){var a=c.getKey(),b;if(a===c.SPACE||a===c.ENTER){b=c.getTarget(this.buttonSelector);if(b){Ext.getCmp(b.id).onClick(c)}}},toggleGroup:function(b,e){if(e){var d=this.groups[b.toggleGroup],c=d.length,a;for(a=0;a<c;a++){if(d[a]!==b){d[a].toggle(false)}}}},register:function(b){var c=this,a=this.groups,d=a[b.toggleGroup];c.init();if(!b.toggleGroup){return}if(!d){d=a[b.toggleGroup]=[]}d.push(b);b.on("toggle",c.toggleGroup,c)},unregister:function(a){if(!a.toggleGroup){return}var b=this,c=b.groups[a.toggleGroup];if(c){Ext.Array.remove(c,a);a.un("toggle",b.toggleGroup,b)}},getPressed:function(d){var c=this.groups[d],b=0,a;if(c){for(a=c.length;b<a;b++){if(c[b].pressed===true){return c[b]}}}return null}});Ext.define("Ext.menu.Manager",{singleton:true,alternateClassName:"Ext.menu.MenuMgr",menuSelector:"."+Ext.baseCSSPrefix+"menu",menus:{},groups:{},attached:false,lastShow:new Date(),init:function(){var a=this;a.active=new Ext.util.MixedCollection();Ext.getDoc().addKeyListener(27,function(){if(a.active.length>0){a.hideAll()}},a)},hideAll:function(){var c=this.active,e,b,a,d;if(c&&c.length>0){e=c.clone();b=e.items;d=b.length;for(a=0;a<d;a++){b[a].hide()}return true}return false},onHide:function(a){var b=this,c=b.active;c.remove(a);if(c.length<1){Ext.getDoc().un("mousedown",b.onMouseDown,b);b.attached=false}},onShow:function(a){var c=this,d=c.active,b=c.attached;c.lastShow=new Date();d.add(a);if(!b){Ext.getDoc().on("mousedown",c.onMouseDown,c,{buffer:Ext.isIE9m?10:undefined});c.attached=true}a.toFront()},onBeforeHide:function(a){if(a.activeChild){a.activeChild.hide()}if(a.autoHideTimer){clearTimeout(a.autoHideTimer);delete a.autoHideTimer}},onBeforeShow:function(a){var c=this.active,b=a.parentMenu;c.remove(a);if(!b&&!a.allowOtherMenus){this.hideAll()}else{if(b&&b.activeChild&&a!=b.activeChild){b.activeChild.hide()}}},onMouseDown:function(g){var b=this,d=b.active,a=b.lastShow,c=true;if(Ext.Date.getElapsed(a)>50&&d.length>0&&!g.getTarget(b.menuSelector)){if(Ext.isIE9m&&!Ext.getBody().contains(g.target)){c=false}if(c){b.hideAll()}}},register:function(b){var a=this;if(!a.active){a.init()}if(b.floating){a.menus[b.id]=b;b.on({beforehide:a.onBeforeHide,hide:a.onHide,beforeshow:a.onBeforeShow,show:a.onShow,scope:a})}},get:function(b){var a=this.menus;if(typeof b=="string"){if(!a){return null}return a[b]}else{if(b.isMenu){return b}else{if(Ext.isArray(b)){return new Ext.menu.Menu({items:b})}else{return Ext.ComponentManager.create(b,"menu")}}}},unregister:function(d){var a=this,b=a.menus,c=a.active;delete b[d.id];c.remove(d);d.un({beforehide:a.onBeforeHide,hide:a.onHide,beforeshow:a.onBeforeShow,show:a.onShow,scope:a})},registerCheckable:function(c){var a=this.groups,b=c.group;if(b){if(!a[b]){a[b]=[]}a[b].push(c)}},unregisterCheckable:function(c){var a=this.groups,b=c.group;if(b){Ext.Array.remove(a[b],c)}},onCheckChange:function(d,g){var a=this.groups,c=d.group,b=0,j,e,h;if(c&&g){j=a[c];e=j.length;for(;b<e;b++){h=j[b];if(h!=d){h.setChecked(false)}}}}});Ext.define("Ext.util.ClickRepeater",{extend:Ext.util.Observable,constructor:function(b,a){var c=this;c.el=Ext.get(b);c.el.unselectable();Ext.apply(c,a);c.callParent();c.addEvents("mousedown","click","mouseup");if(!c.disabled){c.disabled=true;c.enable()}if(c.handler){c.on("click",c.handler,c.scope||c)}},interval:20,delay:250,preventDefault:true,stopDefault:false,timer:0,enable:function(){if(this.disabled){this.el.on("mousedown",this.handleMouseDown,this);if(Ext.isIE&&!(Ext.isIE10p||(Ext.isStrict&&Ext.isIE9))){this.el.on("dblclick",this.handleDblClick,this)}if(this.preventDefault||this.stopDefault){this.el.on("click",this.eventOptions,this)}}this.disabled=false},disable:function(a){if(a||!this.disabled){clearTimeout(this.timer);if(this.pressedCls){this.el.removeCls(this.pressedCls)}Ext.getDoc().un("mouseup",this.handleMouseUp,this);this.el.removeAllListeners()}this.disabled=true},setDisabled:function(a){this[a?"disable":"enable"]()},eventOptions:function(a){if(this.preventDefault){a.preventDefault()}if(this.stopDefault){a.stopEvent()}},destroy:function(){this.disable(true);Ext.destroy(this.el);this.clearListeners()},handleDblClick:function(a){clearTimeout(this.timer);this.el.blur();this.fireEvent("mousedown",this,a);this.fireEvent("click",this,a)},handleMouseDown:function(a){clearTimeout(this.timer);this.el.blur();if(this.pressedCls){this.el.addCls(this.pressedCls)}this.mousedownTime=new Date();Ext.getDoc().on("mouseup",this.handleMouseUp,this);this.el.on("mouseout",this.handleMouseOut,this);this.fireEvent("mousedown",this,a);this.fireEvent("click",this,a);if(this.accelerate){this.delay=400}a=new Ext.EventObjectImpl(a);this.timer=Ext.defer(this.click,this.delay||this.interval,this,[a])},click:function(a){this.fireEvent("click",this,a);this.timer=Ext.defer(this.click,this.accelerate?this.easeOutExpo(Ext.Date.getElapsed(this.mousedownTime),400,-390,12000):this.interval,this,[a])},easeOutExpo:function(e,a,h,g){return(e==g)?a+h:h*(-Math.pow(2,-10*e/g)+1)+a},handleMouseOut:function(){clearTimeout(this.timer);if(this.pressedCls){this.el.removeCls(this.pressedCls)}this.el.on("mouseover",this.handleMouseReturn,this)},handleMouseReturn:function(){this.el.un("mouseover",this.handleMouseReturn,this);if(this.pressedCls){this.el.addCls(this.pressedCls)}this.click()},handleMouseUp:function(a){clearTimeout(this.timer);this.el.un("mouseover",this.handleMouseReturn,this);this.el.un("mouseout",this.handleMouseOut,this);Ext.getDoc().un("mouseup",this.handleMouseUp,this);if(this.pressedCls){this.el.removeCls(this.pressedCls)}this.fireEvent("mouseup",this,a)}});Ext.define("Ext.layout.component.Button",{alias:["layout.button"],extend:Ext.layout.component.Auto,type:"button",htmlRE:/<.*>/,beginLayout:function(c){var b=this,a=b.owner,d=a.text;b.callParent(arguments);c.btnWrapContext=c.getEl("btnWrap");c.btnElContext=c.getEl("btnEl");c.btnInnerElContext=c.getEl("btnInnerEl");c.btnIconElContext=c.getEl("btnIconEl");if(d&&b.htmlRE.test(d)){c.isHtmlText=true;a.btnInnerEl.setStyle("line-height","normal");a.btnInnerEl.setStyle("padding-top","")}},beginLayoutCycle:function(b){var a=this.owner,c=this.lastWidthModel;this.callParent(arguments);if(c&&!this.lastWidthModel.shrinkWrap&&b.widthModel.shrinkWrap){a.btnWrap.setStyle("height","");a.btnEl.setStyle("height","");a.btnInnerEl.setStyle("line-height","")}},calculate:function(d){var g=this,c=g.owner,h=d.btnElContext,e=d.btnInnerElContext,k=d.btnWrapContext,b,i,j,a;g.callParent(arguments);if(d.heightModel.shrinkWrap){j=c.btnEl.getHeight();if(d.isHtmlText){g.centerInnerEl(d,j);g.ieCenterIcon(d,j)}}else{b=d.getProp("height");if(b){i=b-d.getFrameInfo().height-d.getPaddingInfo().height;j=i;if((c.menu||c.split)&&c.arrowAlign==="bottom"){j-=k.getPaddingInfo().bottom}a=j;if((c.icon||c.iconCls||c.glyph)&&(c.iconAlign==="top"||c.iconAlign==="bottom")){a-=e.getPaddingInfo().height}k.setProp("height",i);h.setProp("height",j);if(d.isHtmlText){g.centerInnerEl(d,j)}else{e.setProp("line-height",a+"px")}g.ieCenterIcon(d,j)}else{g.done=false}}},centerInnerEl:function(e,d){var c=this,b=e.btnInnerElContext,a=c.owner.btnInnerEl.getHeight();if(e.heightModel.shrinkWrap&&(d<a)){e.btnElContext.setHeight(a)}else{if(d>a){b.setProp("padding-top",Math.round((d-a)/2)+b.getPaddingInfo().top)}}},ieCenterIcon:function(c,b){var a=this.owner.iconAlign;if((Ext.isIEQuirks||Ext.isIE6)&&(a==="left"||a==="right")){c.btnIconElContext.setHeight(b)}},publishInnerWidth:function(b,a){if(this.owner.getFrameInfo().table){b.btnInnerElContext.setWidth(a-b.getFrameInfo().width-b.getPaddingInfo().width-b.btnWrapContext.getPaddingInfo().width)}}});Ext.define("Ext.util.TextMetrics",{statics:{shared:null,measure:function(a,d,e){var b=this,c=b.shared;if(!c){c=b.shared=new b(a,e)}c.bind(a);c.setFixedWidth(e||"auto");return c.getSize(d)},destroy:function(){var a=this;Ext.destroy(a.shared);a.shared=null}},constructor:function(a,c){var b=this.measure=Ext.getBody().createChild({cls:Ext.baseCSSPrefix+"textmetrics"});this.el=Ext.get(a);b.position("absolute");b.setLocalXY(-1000,-1000);b.hide();if(c){b.setWidth(c)}},getSize:function(c){var b=this.measure,a;b.update(c);a=b.getSize();b.update("");return a},bind:function(a){var b=this;b.el=Ext.get(a);b.measure.setStyle(b.el.getStyles("font-size","font-style","font-weight","font-family","line-height","text-transform","letter-spacing"))},setFixedWidth:function(a){this.measure.setWidth(a)},getWidth:function(a){this.measure.dom.style.width="auto";return this.getSize(a).width},getHeight:function(a){return this.getSize(a).height},destroy:function(){var a=this;a.measure.remove();delete a.el;delete a.measure}},function(){Ext.Element.addMethods({getTextWidth:function(c,b,a){return Ext.Number.constrain(Ext.util.TextMetrics.measure(this.dom,Ext.value(c,this.dom.innerHTML,true)).width,b||0,a||1000000)}})});Ext.define("Ext.button.Button",{alias:"widget.button",extend:Ext.Component,alternateClassName:"Ext.Button",isButton:true,componentLayout:"button",hidden:false,disabled:false,pressed:false,enableToggle:false,menuAlign:"tl-bl?",showEmptyMenu:false,textAlign:"center",type:"button",clickEvent:"click",preventDefault:true,handleMouseEvents:true,tooltipType:"qtip",baseCls:Ext.baseCSSPrefix+"btn",pressedCls:"pressed",overCls:"over",focusCls:"focus",menuActiveCls:"menu-active",hrefTarget:"_blank",border:true,childEls:["btnEl","btnWrap","btnInnerEl","btnIconEl"],renderTpl:['<div id="{id}-btnWrap" class="{baseCls}-wrap','<tpl if="splitCls"> {splitCls}</tpl>','{childElCls}" unselectable="on">','<a id="{id}-btnEl" class="{baseCls}-button" role="button" hidefocus="on" unselectable="on"','<tpl if="tabIndex != null>',' tabIndex="{tabIndex}"',"</tpl>",'<tpl if="href">',' href="{href}"','<tpl if="hrefTarget">',' target="{hrefTarget}"',"</tpl>","</tpl>",">",'<span id="{id}-btnInnerEl" class="{baseCls}-inner {innerCls}','{childElCls}" unselectable="on">',"{text}","</span>",'<span role="img" id="{id}-btnIconEl" class="{baseCls}-icon-el {iconCls}','{childElCls} {glyphCls}" unselectable="on" style="','<tpl if="iconUrl">background-image:url({iconUrl});</tpl>','<tpl if="glyph && glyphFontFamily">font-family:{glyphFontFamily};</tpl>">','<tpl if="glyph">&#{glyph};</tpl><tpl if="iconCls || iconUrl">&#160;</tpl>',"</span>","</a>","</div>",'<tpl if="closable">','<a id="{id}-closeEl" class="{baseCls}-close-btn" title="{closeText}" href="#"></a>',"</tpl>"],scale:"small",allowedScales:["small","medium","large"],iconAlign:"left",arrowAlign:"right",arrowCls:"arrow",maskOnDisable:false,shrinkWrap:3,frame:true,_triggerRegion:{},initComponent:function(){var a=this;a.addCls("x-unselectable");a.callParent(arguments);a.addEvents("click","toggle","mouseover","mouseout","menushow","menuhide","menutriggerover","menutriggerout","textchange","iconchange","glyphchange");if(a.menu){a.split=true;a.menu=Ext.menu.Manager.get(a.menu);a.menu.ownerButton=a}if(a.url){a.href=a.url}if(a.href&&!a.hasOwnProperty("preventDefault")){a.preventDefault=false}if(Ext.isString(a.toggleGroup)&&a.toggleGroup!==""){a.enableToggle=true}if(a.html&&!a.text){a.text=a.html;delete a.html}a.glyphCls=a.baseCls+"-glyph"},getActionEl:function(){return this.btnEl},getFocusEl:function(){return this.useElForFocus?this.el:this.btnEl},onFocus:function(b){var a=this;a.useElForFocus=true;a.callParent(arguments);a.useElForFocus=false},onBlur:function(a){this.useElForFocus=true;this.callParent(arguments);this.useElForFocus=false},onDisable:function(){this.useElForFocus=true;this.callParent(arguments);this.useElForFocus=false},setComponentCls:function(){var b=this,a=b.getComponentCls();if(!Ext.isEmpty(b.oldCls)){b.removeClsWithUI(b.oldCls);b.removeClsWithUI(b.pressedCls)}b.oldCls=a;b.addClsWithUI(a)},getComponentCls:function(){var b=this,a=[];if(b.iconCls||b.icon||b.glyph){if(b.text){a.push("icon-text-"+b.iconAlign)}else{a.push("icon")}}else{if(b.text){a.push("noicon")}}if(b.pressed){a.push(b.pressedCls)}return a},beforeRender:function(){var a=this;a.callParent();a.oldCls=a.getComponentCls();a.addClsWithUI(a.oldCls);Ext.applyIf(a.renderData,a.getTemplateArgs())},onRender:function(){var c=this,d,a,b;c.doc=Ext.getDoc();c.callParent(arguments);a=c.el;if(c.tooltip){c.setTooltip(c.tooltip,true)}if(c.handleMouseEvents){b={scope:c,mouseover:c.onMouseOver,mouseout:c.onMouseOut,mousedown:c.onMouseDown};if(c.split){b.mousemove=c.onMouseMove}}else{b={scope:c}}if(c.menu){c.mon(c.menu,{scope:c,show:c.onMenuShow,hide:c.onMenuHide});c.keyMap=new Ext.util.KeyMap({target:c.el,key:Ext.EventObject.DOWN,handler:c.onDownKey,scope:c})}if(c.repeat){c.mon(new Ext.util.ClickRepeater(a,Ext.isObject(c.repeat)?c.repeat:{}),"click",c.onRepeatClick,c)}else{if(b[c.clickEvent]){d=true}else{b[c.clickEvent]=c.onClick}}c.mon(a,b);if(d){c.mon(a,c.clickEvent,c.onClick,c)}Ext.button.Manager.register(c)},getTemplateArgs:function(){var c=this,b=c.glyph,d=Ext._glyphFontFamily,a;if(typeof b==="string"){a=b.split("@");b=a[0];d=a[1]}return{href:c.getHref(),hrefTarget:c.hrefTarget,type:c.type,innerCls:c.getInnerCls(),splitCls:c.getSplitCls(),iconUrl:c.icon,iconCls:c.iconCls,glyph:b,glyphCls:b?c.glyphCls:"",glyphFontFamily:d,text:c.text||"&#160;",tabIndex:c.tabIndex==null?0:c.tabIndex}},setHref:function(a){this.href=a;this.btnEl.dom.href=this.getHref()},getHref:function(){var b=this,a=b.href;return a?Ext.urlAppend(a,Ext.Object.toQueryString(Ext.apply({},b.params,b.baseParams))):false},setParams:function(a){this.params=a;this.btnEl.dom.href=this.getHref()},getSplitCls:function(){var a=this;return a.split?(a.baseCls+"-"+a.arrowCls)+" "+(a.baseCls+"-"+a.arrowCls+"-"+a.arrowAlign):""},getInnerCls:function(){return this.textAlign?this.baseCls+"-inner-"+this.textAlign:""},setIcon:function(b){b=b||"";var c=this,a=c.btnIconEl,d=c.icon||"";c.icon=b;if(b!=d){if(a){a.setStyle("background-image",b?"url("+b+")":"");c.setComponentCls();if(c.didIconStateChange(d,b)){c.updateLayout()}}c.fireEvent("iconchange",c,d,b)}return c},setIconCls:function(b){b=b||"";var d=this,a=d.btnIconEl,c=d.iconCls||"";d.iconCls=b;if(c!=b){if(a){a.removeCls(c);a.addCls(b||"");d.setComponentCls();if(d.didIconStateChange(c,b)){d.updateLayout()}}d.fireEvent("iconchange",d,c,b)}return d},setGlyph:function(g){g=g||0;var e=this,b=e.btnIconEl,c=e.glyph,a,d;e.glyph=g;if(b){if(typeof g==="string"){d=g.split("@");g=d[0];a=d[1]||Ext._glyphFontFamily}if(!g){b.dom.innerHTML=""}else{if(c!=g){b.dom.innerHTML="&#"+g+";"}}if(a){b.setStyle("font-family",a)}}e.fireEvent("glyphchange",e,e.glyph,c);return e},setTooltip:function(c,a){var b=this;if(b.rendered){if(!a||!c){b.clearTip()}if(c){if(Ext.quickTipsActive&&Ext.isObject(c)){Ext.tip.QuickTipManager.register(Ext.apply({target:b.btnEl.id},c));b.tooltip=c}else{b.btnEl.dom.setAttribute(b.getTipAttr(),c)}}}else{b.tooltip=c}return b},setTextAlign:function(c){var b=this,a=b.btnEl;if(a){a.removeCls(b.baseCls+"-inner-"+b.textAlign);a.addCls(b.baseCls+"-inner-"+c)}b.textAlign=c;return b},getTipAttr:function(){return this.tooltipType=="qtip"?"data-qtip":"title"},getRefItems:function(a){var c=this.menu,b;if(c){b=c.getRefItems(a);b.unshift(c)}return b||[]},clearTip:function(){var b=this,a=b.btnEl;if(Ext.quickTipsActive&&Ext.isObject(b.tooltip)){Ext.tip.QuickTipManager.unregister(a)}else{a.dom.removeAttribute(b.getTipAttr())}},beforeDestroy:function(){var a=this;if(a.rendered){a.clearTip()}if(a.menu&&a.destroyMenu!==false){Ext.destroy(a.menu)}Ext.destroy(a.btnInnerEl,a.repeater);a.callParent()},onDestroy:function(){var a=this;if(a.rendered){a.doc.un("mouseover",a.monitorMouseOver,a);a.doc.un("mouseup",a.onMouseUp,a);delete a.doc;Ext.destroy(a.keyMap);delete a.keyMap}Ext.button.Manager.unregister(a);a.callParent()},setHandler:function(b,a){this.handler=b;this.scope=a;return this},setText:function(c){c=c||"";var b=this,a=b.text||"";if(c!=a){b.text=c;if(b.rendered){b.btnInnerEl.update(c||"&#160;");b.setComponentCls();if(Ext.isStrict&&Ext.isIE8){b.el.repaint()}b.updateLayout()}b.fireEvent("textchange",b,a,c)}return b},didIconStateChange:function(a,c){var b=Ext.isEmpty(c);return Ext.isEmpty(a)?!b:b},getText:function(){return this.text},toggle:function(c,a){var b=this;c=c===undefined?!b.pressed:!!c;if(c!==b.pressed){if(b.rendered){b[c?"addClsWithUI":"removeClsWithUI"](b.pressedCls)}b.pressed=c;if(!a){b.fireEvent("toggle",b,c);Ext.callback(b.toggleHandler,b.scope||b,[b,c])}}return b},maybeShowMenu:function(){var a=this;if(a.menu&&!a.hasVisibleMenu()&&!a.ignoreNextClick){a.showMenu(true)}},showMenu:function(b){var a=this,c=a.menu;if(a.rendered){if(a.tooltip&&Ext.quickTipsActive&&a.getTipAttr()!="title"){Ext.tip.QuickTipManager.getQuickTip().cancelShow(a.btnEl)}if(c.isVisible()){c.hide()}if(!b||a.showEmptyMenu||c.items.getCount()>0){c.showBy(a.el,a.menuAlign,(Ext.isIEQuirks||Ext.isIE6)?[-2,-2]:undefined)}}return a},hideMenu:function(){if(this.hasVisibleMenu()){this.menu.hide()}return this},hasVisibleMenu:function(){var a=this.menu;return a&&a.rendered&&a.isVisible()},onRepeatClick:function(a,b){this.onClick(b)},onClick:function(b){var a=this;if(a.preventDefault||(a.disabled&&a.getHref())&&b){b.preventDefault()}if(b.type!=="keydown"&&b.button!==0){return}if(!a.disabled){a.doToggle();a.maybeShowMenu();a.fireHandler(b)}},fireHandler:function(c){var b=this,a=b.handler;if(b.fireEvent("click",b,c)!==false){if(a){a.call(b.scope||b,b,c)}b.blur()}},doToggle:function(){var a=this;if(a.enableToggle&&(a.allowDepress!==false||!a.pressed)){a.toggle()}},onMouseOver:function(b){var a=this;if(!a.disabled&&!b.within(a.el,true,true)){a.onMouseEnter(b)}},onMouseOut:function(b){var a=this;if(!b.within(a.el,true,true)){if(a.overMenuTrigger){a.onMenuTriggerOut(b)}a.onMouseLeave(b)}},onMouseMove:function(g){var c=this,b=c.el,d=c.overMenuTrigger,h,a;if(c.split){h=(c.arrowAlign==="right")?g.getX()-c.getX():g.getY()-b.getY();a=c.getTriggerRegion();if(h>a.begin&&h<a.end){if(!d){c.onMenuTriggerOver(g)}}else{if(d){c.onMenuTriggerOut(g)}}}},getTriggerRegion:function(){var c=this,d=c._triggerRegion,b=c.getTriggerSize(),a=c.arrowAlign==="right"?c.getWidth():c.getHeight();d.begin=a-b;d.end=a;return d},getTriggerSize:function(){var d=this,c=d.triggerSize,b,a;if(c==null){b=d.arrowAlign;a=b.charAt(0);c=d.triggerSize=d.el.getFrameWidth(a)+d.getBtnWrapFrameWidth(a);if(d.frameSize){c=d.triggerSize+=d.frameSize[b]}}return c},getBtnWrapFrameWidth:function(a){return this.btnWrap.getFrameWidth(a)},addOverCls:function(){if(!this.disabled){this.addClsWithUI(this.overCls)}},removeOverCls:function(){this.removeClsWithUI(this.overCls)},onMouseEnter:function(a){this.fireEvent("mouseover",this,a)},onMouseLeave:function(a){this.fireEvent("mouseout",this,a)},onMenuTriggerOver:function(c){var b=this,a=b.arrowTooltip;b.overMenuTrigger=true;if(b.split&&a){b.btnWrap.dom.setAttribute(b.getTipAttr(),a)}b.fireEvent("menutriggerover",b,b.menu,c)},onMenuTriggerOut:function(b){var a=this;delete a.overMenuTrigger;if(a.split&&a.arrowTooltip){a.btnWrap.dom.setAttribute(a.getTipAttr(),"")}a.fireEvent("menutriggerout",a,a.menu,b)},enable:function(a){var b=this;b.callParent(arguments);b.removeClsWithUI("disabled");return b},disable:function(a){var b=this;b.callParent(arguments);b.addClsWithUI("disabled");b.removeClsWithUI(b.overCls);if(b.btnInnerEl&&Ext.isIE7m){b.btnInnerEl.repaint()}return b},setScale:function(c){var a=this,b=a.ui.replace("-"+a.scale,"");if(!Ext.Array.contains(a.allowedScales,c)){throw ("#setScale: scale must be an allowed scale ("+a.allowedScales.join(", ")+")")}a.scale=c;a.setUI(b)},setUI:function(b){var a=this;if(a.scale&&!b.match(a.scale)){b=b+"-"+a.scale}a.callParent([b])},onMouseDown:function(b){var a=this;if(!a.disabled&&b.button===0){a.addClsWithUI(a.pressedCls);a.doc.on("mouseup",a.onMouseUp,a)}},onMouseUp:function(b){var a=this;if(b.button===0){if(!a.pressed){a.removeClsWithUI(a.pressedCls)}a.doc.un("mouseup",a.onMouseUp,a)}},onMenuShow:function(b){var a=this;a.ignoreNextClick=0;a.addClsWithUI(a.menuActiveCls);a.fireEvent("menushow",a,a.menu)},onMenuHide:function(b){var a=this;a.removeClsWithUI(a.menuActiveCls);a.ignoreNextClick=Ext.defer(a.restoreClick,250,a);a.fireEvent("menuhide",a,a.menu)},restoreClick:function(){this.ignoreNextClick=0},onDownKey:function(){var a=this;if(!a.disabled){if(a.menu){a.showMenu()}}}});Ext.define("Ext.layout.container.boxOverflow.Menu",{extend:Ext.layout.container.boxOverflow.None,alternateClassName:"Ext.layout.boxOverflow.Menu",noItemsMenuText:'<div class="'+Ext.baseCSSPrefix+'toolbar-no-items">(None)</div>',constructor:function(b){var a=this;a.callParent(arguments);a.triggerButtonCls=a.triggerButtonCls||Ext.baseCSSPrefix+"box-menu-after";a.menuItems=[]},beginLayout:function(a){this.callParent(arguments);this.clearOverflow(a)},beginLayoutCycle:function(b,a){this.callParent(arguments);if(!a){this.clearOverflow(b);this.layout.cacheChildItems(b)}},onRemove:function(a){Ext.Array.remove(this.menuItems,a)},getSuffixConfig:function(){var d=this,c=d.layout,a=c.owner,b=a.id;d.menu=new Ext.menu.Menu({listeners:{scope:d,beforeshow:d.beforeMenuShow}});d.menuTrigger=new Ext.button.Button({id:b+"-menu-trigger",cls:Ext.layout.container.Box.prototype.innerCls+" "+d.triggerButtonCls+" "+Ext.baseCSSPrefix+"toolbar-item",plain:a.usePlainButtons,ownerCt:a,ownerLayout:c,iconCls:Ext.baseCSSPrefix+d.getOwnerType(a)+"-more-icon",ui:a instanceof Ext.toolbar.Toolbar?"default-toolbar":"default",menu:d.menu,showEmptyMenu:true,getSplitCls:function(){return""}});return d.menuTrigger.getRenderTree()},getOverflowCls:function(){return Ext.baseCSSPrefix+this.layout.direction+"-box-overflow-body"},handleOverflow:function(d){var c=this,b=c.layout,g=b.names,e=d.state.boxPlan,a=[null,null];c.showTrigger(d);if(c.layout.direction!=="vertical"){a[g.heightIndex]=(e.maxSize-c.menuTrigger[g.getHeight]())/2;c.menuTrigger.setPosition.apply(c.menuTrigger,a)}return{reservedSpace:c.triggerTotalWidth}},captureChildElements:function(){var a=this,c=a.menuTrigger,b=a.layout.names;if(c.rendering){c.finishRender();a.triggerTotalWidth=c[b.getWidth]()+c.el.getMargin(b.parallelMargins)}},_asLayoutRoot:{isRoot:true},clearOverflow:function(h){var g=this,b=g.menuItems,e,c=0,d=b.length,a=g.layout.owner,j=g._asLayoutRoot;a.suspendLayouts();g.captureChildElements();g.hideTrigger();a.resumeLayouts();for(;c<d;c++){e=b[c];e.suspendLayouts();e.show();e.resumeLayouts(j)}b.length=0},showTrigger:function(c){var o=this,k=o.layout,a=k.owner,n=k.names,r=n.x,e=n.width,p=c.state.boxPlan,b=p.targetSize[e],h=c.childItems,l=h.length,g=o.menuTrigger,q,j,d,m;g.suspendLayouts();g.show();g.resumeLayouts(o._asLayoutRoot);b-=o.triggerTotalWidth;a.suspendLayouts();o.menuItems.length=0;for(d=0;d<l;d++){q=h[d];m=q.props;if(m[r]+m[e]>b){j=q.target;o.menuItems.push(j);j.hide()}}a.resumeLayouts()},hideTrigger:function(){var a=this.menuTrigger;if(a){a.hide()}},beforeMenuShow:function(j){var h=this,b=h.menuItems,d=0,a=b.length,g,e,c=function(k,i){return k.isXType("buttongroup")&&!(i instanceof Ext.toolbar.Separator)};j.suspendLayouts();h.clearMenu();j.removeAll();for(;d<a;d++){g=b[d];if(!d&&(g instanceof Ext.toolbar.Separator)){continue}if(e&&(c(g,e)||c(e,g))){j.add("-")}h.addComponentToMenu(j,g);e=g}if(j.items.length<1){j.add(h.noItemsMenuText)}j.resumeLayouts()},createMenuConfig:function(c,a){var d=this,b=Ext.apply({},c.initialConfig),e=c.toggleGroup;Ext.copyTo(b,c,["iconCls","icon","itemId","disabled","handler","scope","menu","tabIndex"]);Ext.apply(b,{text:c.overflowText||c.text,hideOnClick:a,destroyMenu:false,listeners:{}});if(c.isFormField){b.value=c.getValue();b.listeners.change=function(i,h,g){c.setValue(h)}}else{if(e||c.enableToggle){Ext.apply(b,{hideOnClick:false,group:e,checked:c.pressed,handler:function(g,h){c.onClick(h)}})}}if(c.isButton&&!c.changeListenersAdded){c.on({textchange:d.onButtonAttrChange,iconchange:d.onButtonAttrChange,toggle:d.onButtonToggle});c.changeListenersAdded=true}delete b.ownerCt;delete b.xtype;delete b.id;return b},onButtonAttrChange:function(a){var b=a.overflowClone;b.suspendLayouts();b.setText(a.text);b.setIcon(a.icon);b.setIconCls(a.iconCls);b.resumeLayouts(true)},onButtonToggle:function(a,b){if(a.overflowClone.checked!==b){a.overflowClone.setChecked(b)}},addComponentToMenu:function(g,c){var e=this,d,b,a;if(c instanceof Ext.toolbar.Separator){g.add("-")}else{if(c.isComponent){if(c.isXType("splitbutton")){c.overflowClone=g.add(e.createMenuConfig(c,true))}else{if(c.isXType("button")){c.overflowClone=g.add(e.createMenuConfig(c,!c.menu))}else{if(c.isXType("buttongroup")){b=c.items.items;a=b.length;for(d=0;d<a;d++){e.addComponentToMenu(g,b[d])}}else{c.overflowClone=g.add(Ext.create(Ext.getClassName(c),e.createMenuConfig(c)))}}}}}},clearMenu:function(){var e=this.menu,b,c,a,d;if(e&&e.items){b=e.items.items;a=b.length;for(c=0;c<a;c++){d=b[c];if(d.setMenu){d.setMenu(null)}}}},destroy:function(){var a=this.menuTrigger;if(a&&!this.layout.owner.items.contains(a)){delete a.ownerCt}Ext.destroy(this.menu,a)}});Ext.define("Ext.layout.container.boxOverflow.Scroller",{extend:Ext.layout.container.boxOverflow.None,alternateClassName:"Ext.layout.boxOverflow.Scroller",mixins:{observable:Ext.util.Observable},animateScroll:false,scrollIncrement:20,wheelIncrement:10,scrollRepeatInterval:60,scrollDuration:400,scrollerCls:Ext.baseCSSPrefix+"box-scroller",constructor:function(c,a){var b=this;b.layout=c;Ext.apply(b,a||{});b.mixins.observable.constructor.call(b);b.addEvents("scroll");b.scrollPosition=0;b.scrollSize=0},getPrefixConfig:function(){var c=this,a=c.layout.owner,b;c.initCSSClasses();b=Ext.layout.container.Box.prototype.innerCls+" "+c.beforeCtCls;if(a.plain){b+=" "+c.scrollerCls+"-plain"}return{cls:b,cn:{id:a.id+"-before-scroller",cls:c.scrollerCls+" "+c.beforeScrollerCls,style:"display:none"}}},getSuffixConfig:function(){var c=this,a=c.layout.owner,b=Ext.layout.container.Box.prototype.innerCls+" "+c.afterCtCls;if(a.plain){b+=" "+c.scrollerCls+"-plain"}return{cls:b,cn:{id:c.layout.owner.id+"-after-scroller",cls:c.scrollerCls+" "+c.afterScrollerCls,style:"display:none"}}},getOverflowCls:function(){return Ext.baseCSSPrefix+this.layout.direction+"-box-overflow-body"},initCSSClasses:function(){var d=this,g=Ext.baseCSSPrefix,c=d.layout,h=c.names,a=h.beforeX,e=h.afterX,b=d.getOwnerType(c.owner);d.beforeCtCls=d.beforeCtCls||g+"box-scroller-"+a;d.afterCtCls=d.afterCtCls||g+"box-scroller-"+e;d.beforeScrollerCls=d.beforeScrollerCls||g+b+"-scroll-"+a;d.afterScrollerCls=d.afterScrollerCls||g+b+"-scroll-"+e},beginLayout:function(a){a.innerCtScrollPos=this.getElScrollPos();this.callParent(arguments)},completeLayout:function(c){var b=this,e=c.state.boxPlan,d=b.layout.names,a;if(e&&e.tooNarrow){a=c.childItems[c.childItems.length-1];b.scrollSize=a.props[d.x]+a.props[d.width];b.updateScrollButtons()}this.callParent(arguments)},finishedLayout:function(a){var b=Math.min(this.getMaxScrollPosition(),a.innerCtScrollPos);this.setElScrollPos(b)},setElScrollPos:function(b){var a=this.layout;if(a.direction==="vertical"){a.innerCt.dom.scrollTop=b}else{a.innerCt.setScrollLeft(b)}},getElScrollPos:function(){var a=this.layout;if(a.direction==="vertical"){return a.innerCt.dom.scrollTop}else{return a.innerCt.getScrollLeft()}},handleOverflow:function(c){var b=this,a=b.layout.names.getWidth;b.showScrollers();return{reservedSpace:b.beforeCt[a]()+b.afterCt[a]()}},captureChildElements:function(){var e=this,c=e.layout.owner.el,g,i,b,a,d,h;if(!e.beforeCt){h="-hover";a="-pressed";b=e.scrollerCls+h;d=e.scrollerCls+a;g=e.beforeScroller=c.getById(e.layout.owner.id+"-before-scroller");i=e.afterScroller=c.getById(e.layout.owner.id+"-after-scroller");e.beforeCt=g.up("");e.afterCt=i.up("");e.createWheelListener();g.addClsOnOver(b);g.addClsOnOver(e.beforeScrollerCls+h);g.addClsOnClick(d);g.addClsOnClick(e.beforeScrollerCls+a);i.addClsOnOver(b);i.addClsOnOver(e.afterScrollerCls+h);i.addClsOnClick(d);i.addClsOnClick(e.afterScrollerCls+a);g.setVisibilityMode(Ext.Element.DISPLAY);i.setVisibilityMode(Ext.Element.DISPLAY);e.beforeRepeater=new Ext.util.ClickRepeater(g,{interval:e.scrollRepeatInterval,handler:e.scrollLeft,scope:e});e.afterRepeater=new Ext.util.ClickRepeater(i,{interval:e.scrollRepeatInterval,handler:e.scrollRight,scope:e})}},createWheelListener:function(){var a=this;a.layout.innerCt.on({mousewheel:function(b){a.scrollBy(b.getWheelDelta()*a.wheelIncrement*-1,false)},stopEvent:true})},clearOverflow:function(){this.hideScrollers()},showScrollers:function(){var a=this;a.captureChildElements();a.beforeScroller.show();a.afterScroller.show();a.layout.owner.addClsWithUI(a.layout.direction==="vertical"?"vertical-scroller":"scroller")},hideScrollers:function(){var a=this;if(a.beforeScroller!==undefined){a.beforeScroller.hide();a.afterScroller.hide();a.layout.owner.removeClsWithUI(a.layout.direction==="vertical"?"vertical-scroller":"scroller")}},destroy:function(){var a=this;Ext.destroy(a.beforeRepeater,a.afterRepeater,a.beforeScroller,a.afterScroller,a.beforeCt,a.afterCt)},scrollBy:function(b,a){this.scrollTo(this.getScrollPosition()+b,a)},getScrollAnim:function(){return{duration:this.scrollDuration,callback:this.updateScrollButtons,scope:this}},updateScrollButtons:function(){var d=this,h,c,a,b,e,g="-disabled";if(d.beforeScroller==null||d.afterScroller==null){return}h=d.atExtremeBefore()?"addCls":"removeCls";c=d.atExtremeAfter()?"addCls":"removeCls";e=d.scrollerCls+g;a=[e,d.beforeScrollerCls+g];b=[e,d.afterScrollerCls+g];d.beforeScroller[h](a);d.afterScroller[c](b);d.scrolling=false},scrollLeft:function(){this.scrollBy(-this.scrollIncrement,false)},scrollRight:function(){this.scrollBy(this.scrollIncrement,false)},getScrollPosition:function(){var c=this,b=c.layout,a;if(isNaN(c.scrollPosition)){a=c.getElScrollPos()}else{a=c.scrollPosition}return a},getMaxScrollPosition:function(){var b=this,a=b.layout,c=b.scrollSize-a.innerCt[a.names.getWidth]();return(c<0)?0:c},atExtremeBefore:function(){return !this.getScrollPosition()},atExtremeAfter:function(){return this.getScrollPosition()>=this.getMaxScrollPosition()},scrollTo:function(a,b){var g=this,e=g.layout,d=g.getScrollPosition(),c=Ext.Number.constrain(a,0,g.getMaxScrollPosition());if(c!=d&&!g.scrolling){g.scrollPosition=NaN;if(b===undefined){b=g.animateScroll}e.innerCt.scrollTo(e.names.beforeX,c,b?g.getScrollAnim():false);if(b){g.scrolling=true}else{g.updateScrollButtons()}g.fireEvent("scroll",g,c,b?g.getScrollAnim():false)}},scrollToItem:function(j,b){var i=this,e=i.layout,c=e.owner,h=e.names,a,d,g;j=i.getItem(j);if(j!==undefined){if(j==c.items.first()){g=0}else{if(j===c.items.last()){g=i.getMaxScrollPosition()}else{a=i.getItemVisibility(j);if(!a.fullyVisible){d=j.getBox(false,true);g=d[h.x];if(a.hiddenEnd){g-=(i.layout.innerCt[h.getWidth]()-d[h.width])}}}}i.scrollTo(g,b)}},getItemVisibility:function(j){var h=this,b=h.getItem(j).getBox(true,true),c=h.layout,g=c.names,e=b[g.x],d=e+b[g.width],a=h.getScrollPosition(),i=a+c.innerCt[g.getWidth]();return{hiddenStart:e<a,hiddenEnd:d>i,fullyVisible:e>a&&d<i}}});Ext.define("Ext.util.Offset",{statics:{fromObject:function(a){return new this(a.x,a.y)}},constructor:function(a,b){this.x=(a!=null&&!isNaN(a))?a:0;this.y=(b!=null&&!isNaN(b))?b:0;return this},copy:function(){return new Ext.util.Offset(this.x,this.y)},copyFrom:function(a){this.x=a.x;this.y=a.y},toString:function(){return"Offset["+this.x+","+this.y+"]"},equals:function(a){return(this.x==a.x&&this.y==a.y)},round:function(b){if(!isNaN(b)){var a=Math.pow(10,b);this.x=Math.round(this.x*a)/a;this.y=Math.round(this.y*a)/a}else{this.x=Math.round(this.x);this.y=Math.round(this.y)}},isZero:function(){return this.x==0&&this.y==0}});Ext.define("Ext.util.Region",{statics:{getRegion:function(a){return Ext.fly(a).getRegion()},from:function(a){return new this(a.top,a.right,a.bottom,a.left)}},constructor:function(d,g,a,c){var e=this;e.y=e.top=e[1]=d;e.right=g;e.bottom=a;e.x=e.left=e[0]=c},contains:function(b){var a=this;return(b.x>=a.x&&b.right<=a.right&&b.y>=a.y&&b.bottom<=a.bottom)},intersect:function(h){var g=this,d=Math.max(g.y,h.y),e=Math.min(g.right,h.right),a=Math.min(g.bottom,h.bottom),c=Math.max(g.x,h.x);if(a>d&&e>c){return new this.self(d,e,a,c)}else{return false}},union:function(h){var g=this,d=Math.min(g.y,h.y),e=Math.max(g.right,h.right),a=Math.max(g.bottom,h.bottom),c=Math.min(g.x,h.x);return new this.self(d,e,a,c)},constrainTo:function(b){var a=this,c=Ext.Number.constrain;a.top=a.y=c(a.top,b.y,b.bottom);a.bottom=c(a.bottom,b.y,b.bottom);a.left=a.x=c(a.left,b.x,b.right);a.right=c(a.right,b.x,b.right);return a},adjust:function(d,g,a,c){var e=this;e.top=e.y+=d;e.left=e.x+=c;e.right+=g;e.bottom+=a;return e},getOutOfBoundOffset:function(a,b){if(!Ext.isObject(a)){if(a=="x"){return this.getOutOfBoundOffsetX(b)}else{return this.getOutOfBoundOffsetY(b)}}else{b=a;var c=new Ext.util.Offset();c.x=this.getOutOfBoundOffsetX(b.x);c.y=this.getOutOfBoundOffsetY(b.y);return c}},getOutOfBoundOffsetX:function(a){if(a<=this.x){return this.x-a}else{if(a>=this.right){return this.right-a}}return 0},getOutOfBoundOffsetY:function(a){if(a<=this.y){return this.y-a}else{if(a>=this.bottom){return this.bottom-a}}return 0},isOutOfBound:function(a,b){if(!Ext.isObject(a)){if(a=="x"){return this.isOutOfBoundX(b)}else{return this.isOutOfBoundY(b)}}else{b=a;return(this.isOutOfBoundX(b.x)||this.isOutOfBoundY(b.y))}},isOutOfBoundX:function(a){return(a<this.x||a>this.right)},isOutOfBoundY:function(a){return(a<this.y||a>this.bottom)},restrict:function(b,d,a){if(Ext.isObject(b)){var c;a=d;d=b;if(d.copy){c=d.copy()}else{c={x:d.x,y:d.y}}c.x=this.restrictX(d.x,a);c.y=this.restrictY(d.y,a);return c}else{if(b=="x"){return this.restrictX(d,a)}else{return this.restrictY(d,a)}}},restrictX:function(b,a){if(!a){a=1}if(b<=this.x){b-=(b-this.x)*a}else{if(b>=this.right){b-=(b-this.right)*a}}return b},restrictY:function(b,a){if(!a){a=1}if(b<=this.y){b-=(b-this.y)*a}else{if(b>=this.bottom){b-=(b-this.bottom)*a}}return b},getSize:function(){return{width:this.right-this.x,height:this.bottom-this.y}},copy:function(){return new this.self(this.y,this.right,this.bottom,this.x)},copyFrom:function(b){var a=this;a.top=a.y=a[1]=b.y;a.right=b.right;a.bottom=b.bottom;a.left=a.x=a[0]=b.x;return this},toString:function(){return"Region["+this.top+","+this.right+","+this.bottom+","+this.left+"]"},translateBy:function(a,c){if(arguments.length==1){c=a.y;a=a.x}var b=this;b.top=b.y+=c;b.right+=a;b.bottom+=c;b.left=b.x+=a;return b},round:function(){var a=this;a.top=a.y=Math.round(a.y);a.right=Math.round(a.right);a.bottom=Math.round(a.bottom);a.left=a.x=Math.round(a.x);return a},equals:function(a){return(this.top==a.top&&this.right==a.right&&this.bottom==a.bottom&&this.left==a.left)}});Ext.define("Ext.dd.DragDropManager",{singleton:true,alternateClassName:["Ext.dd.DragDropMgr","Ext.dd.DDM"],ids:{},handleIds:{},dragCurrent:null,dragOvers:{},deltaX:0,deltaY:0,preventDefault:true,stopPropagation:true,initialized:false,locked:false,init:function(){this.initialized=true},POINT:0,INTERSECT:1,mode:0,notifyOccluded:false,dragCls:Ext.baseCSSPrefix+"dd-drag-current",_execOnAll:function(c,b){var d,a,e;for(d in this.ids){for(a in this.ids[d]){e=this.ids[d][a];if(!this.isTypeOfDD(e)){continue}e[c].apply(e,b)}}},_onLoad:function(){this.init();var a=Ext.EventManager;a.on(document,"mouseup",this.handleMouseUp,this,true);a.on(document,"mousemove",this.handleMouseMove,this,true);a.on(window,"unload",this._onUnload,this,true);a.on(window,"resize",this._onResize,this,true)},_onResize:function(a){this._execOnAll("resetConstraints",[])},lock:function(){this.locked=true},unlock:function(){this.locked=false},isLocked:function(){return this.locked},locationCache:{},useCache:true,clickPixelThresh:3,clickTimeThresh:350,dragThreshMet:false,clickTimeout:null,startX:0,startY:0,regDragDrop:function(b,a){if(!this.initialized){this.init()}if(!this.ids[a]){this.ids[a]={}}this.ids[a][b.id]=b},removeDDFromGroup:function(c,a){if(!this.ids[a]){this.ids[a]={}}var b=this.ids[a];if(b&&b[c.id]){delete b[c.id]}},_remove:function(b){for(var a in b.groups){if(a&&this.ids[a]&&this.ids[a][b.id]){delete this.ids[a][b.id]}}delete this.handleIds[b.id]},regHandle:function(b,a){if(!this.handleIds[b]){this.handleIds[b]={}}this.handleIds[b][a]=a},isDragDrop:function(a){return(this.getDDById(a))?true:false},getRelated:function(g,b){var e=[],d,c,a;for(d in g.groups){for(c in this.ids[d]){a=this.ids[d][c];if(!this.isTypeOfDD(a)){continue}if(!b||a.isTarget){e[e.length]=a}}}return e},isLegalTarget:function(e,d){var b=this.getRelated(e,true),c,a;for(c=0,a=b.length;c<a;++c){if(b[c].id==d.id){return true}}return false},isTypeOfDD:function(a){return(a&&a.__ygDragDrop)},isHandle:function(b,a){return(this.handleIds[b]&&this.handleIds[b][a])},getDDById:function(c){var b,a;for(b in this.ids){a=this.ids[b][c];if(a instanceof Ext.dd.DDTarget){return a}}return null},handleMouseDown:function(d,c){var b=this,a;if(Ext.quickTipsActive){Ext.tip.QuickTipManager.ddDisable()}if(b.dragCurrent){b.handleMouseUp(d)}b.currentTarget=d.getTarget();b.dragCurrent=c;a=c.getEl();if(Ext.isIE&&a.setCapture){a.setCapture()}b.startX=d.getPageX();b.startY=d.getPageY();b.deltaX=b.startX-a.offsetLeft;b.deltaY=b.startY-a.offsetTop;b.dragThreshMet=false;b.clickTimeout=setTimeout(function(){b.startDrag(b.startX,b.startY)},b.clickTimeThresh)},startDrag:function(b,e){var c=this,d=c.dragCurrent,a;clearTimeout(c.clickTimeout);if(d){d.b4StartDrag(b,e);d.startDrag(b,e);a=d.getDragEl();if(a){Ext.fly(a).addCls(c.dragCls)}}c.dragThreshMet=true},handleMouseUp:function(b){var a=this;if(Ext.quickTipsActive){Ext.tip.QuickTipManager.ddEnable()}if(!a.dragCurrent){return}if(Ext.isIE&&document.releaseCapture){document.releaseCapture()}clearTimeout(a.clickTimeout);if(a.dragThreshMet){a.fireEvents(b,true)}a.stopDrag(b);a.stopEvent(b)},stopEvent:function(a){if(this.stopPropagation){a.stopPropagation()}if(this.preventDefault){a.preventDefault()}},stopDrag:function(d){var b=this,c=b.dragCurrent,a;if(c){if(b.dragThreshMet){a=c.getDragEl();if(a){Ext.fly(a).removeCls(b.dragCls)}c.b4EndDrag(d);c.endDrag(d)}b.dragCurrent.onMouseUp(d)}b.dragCurrent=null;b.dragOvers={}},handleMouseMove:function(g){var c=this,d=c.dragCurrent,b,a;if(!d){return true}if(!c.dragThreshMet){b=Math.abs(c.startX-g.getPageX());a=Math.abs(c.startY-g.getPageY());if(b>c.clickPixelThresh||a>c.clickPixelThresh){c.startDrag(c.startX,c.startY)}}if(c.dragThreshMet){d.b4Drag(g);d.onDrag(g);if(!d.moveOnly){c.fireEvents(g,false)}}c.stopEvent(g);return true},fireEvents:function(u,m){var w=this,g=w.dragCurrent,c,o,s=u.getPoint(),d,l,n=[],h=[],k=[],a=[],v=[],t=[],j,b,q,r,p;if(!g||g.isLocked()){return}if(!w.notifyOccluded&&(!Ext.supports.PointerEvents||Ext.isIE10m||Ext.isOpera)&&!(g.deltaX<0||g.deltaY<0)){c=g.getDragEl();o=c.style.top;c.style.top="-10000px";j=u.getXY();u.target=document.elementFromPoint(j[0],j[1]);c.style.top=o}for(q in w.dragOvers){d=w.dragOvers[q];if(!w.isTypeOfDD(d)){continue}if(w.notifyOccluded){if(!this.isOverTarget(s,d,w.mode)){k.push(d)}}else{if(!u.within(d.getEl())){k.push(d)}}h[q]=true;delete w.dragOvers[q]}for(p in g.groups){if("string"!=typeof p){continue}for(q in w.ids[p]){d=w.ids[p][q];if(w.isTypeOfDD(d)&&(l=d.getEl())&&(d.isTarget)&&(!d.isLocked())&&(Ext.fly(l).isVisible(true))&&((d!=g)||(g.ignoreSelf===false))){if(w.notifyOccluded){if((d.zIndex=w.getZIndex(l))!==-1){b=true}n.push(d)}else{if(u.within(d.getEl())){n.push(d);break}}}}}if(b){Ext.Array.sort(n,w.byZIndex)}for(q=0,r=n.length;q<r;q++){d=n[q];if(w.isOverTarget(s,d,w.mode)){if(m){v.push(d)}else{if(!h[d.id]){t.push(d)}else{a.push(d)}w.dragOvers[d.id]=d}if(!w.notifyOccluded){break}}}if(w.mode){if(k.length){g.b4DragOut(u,k);g.onDragOut(u,k)}if(t.length){g.onDragEnter(u,t)}if(a.length){g.b4DragOver(u,a);g.onDragOver(u,a)}if(v.length){g.b4DragDrop(u,v);g.onDragDrop(u,v)}}else{for(q=0,r=k.length;q<r;++q){g.b4DragOut(u,k[q].id);g.onDragOut(u,k[q].id)}for(q=0,r=t.length;q<r;++q){g.onDragEnter(u,t[q].id)}for(q=0,r=a.length;q<r;++q){g.b4DragOver(u,a[q].id);g.onDragOver(u,a[q].id)}for(q=0,r=v.length;q<r;++q){g.b4DragDrop(u,v[q].id);g.onDragDrop(u,v[q].id)}}if(m&&!v.length){g.onInvalidDrop(u)}},getZIndex:function(b){var a=document.body,c,d=-1;b=Ext.getDom(b);while(b!==a){if(!isNaN(c=Number(Ext.fly(b).getStyle("zIndex")))){d=c}b=b.parentNode}return d},byZIndex:function(b,a){return b.zIndex<a.zIndex},getBestMatch:function(c){var e=null,b=c.length,d,a;if(b==1){e=c[0]}else{for(d=0;d<b;++d){a=c[d];if(a.cursorIsOver){e=a;break}else{if(!e||e.overlap.getArea()<a.overlap.getArea()){e=a}}}}return e},refreshCache:function(b){var a,c,d,e;for(a in b){if("string"!=typeof a){continue}for(c in this.ids[a]){d=this.ids[a][c];if(this.isTypeOfDD(d)){e=this.getLocation(d);if(e){this.locationCache[d.id]=e}else{delete this.locationCache[d.id]}}}}},verifyEl:function(b){if(b){var a;if(Ext.isIE){try{a=b.offsetParent}catch(c){}}else{a=b.offsetParent}if(a){return true}}return false},getLocation:function(i){if(!this.isTypeOfDD(i)){return null}if(i.getRegion){return i.getRegion()}var g=i.getEl(),m,d,c,o,n,p,a,k,h;try{m=Ext.Element.getXY(g)}catch(j){}if(!m){return null}d=m[0];c=d+g.offsetWidth;o=m[1];n=o+g.offsetHeight;p=o-i.padding[0];a=c+i.padding[1];k=n+i.padding[2];h=d-i.padding[3];return new Ext.util.Region(p,a,k,h)},isOverTarget:function(j,a,c){var e=this.locationCache[a.id],i,g,b,d,h;if(!e||!this.useCache){e=this.getLocation(a);this.locationCache[a.id]=e}if(!e){return false}a.cursorIsOver=e.contains(j);i=this.dragCurrent;if(!i||!i.getTargetCoord||(!c&&!i.constrainX&&!i.constrainY)){return a.cursorIsOver}a.overlap=null;g=i.getTargetCoord(j.x,j.y);b=i.getDragEl();d=new Ext.util.Region(g.y,g.x+b.offsetWidth,g.y+b.offsetHeight,g.x);h=d.intersect(e);if(h){a.overlap=h;return(c)?true:a.cursorIsOver}else{return false}},_onUnload:function(b,a){Ext.dd.DragDropManager.unregAll()},unregAll:function(){if(this.dragCurrent){this.stopDrag();this.dragCurrent=null}this._execOnAll("unreg",[]);for(var a in this.elementCache){delete this.elementCache[a]}this.elementCache={};this.ids={}},elementCache:{},getElWrapper:function(b){var a=this.elementCache[b];if(!a||!a.el){a=this.elementCache[b]=new this.ElementWrapper(Ext.getDom(b))}return a},getElement:function(a){return Ext.getDom(a)},getCss:function(b){var a=Ext.getDom(b);return(a)?a.style:null},ElementWrapper:function(a){this.el=a||null;this.id=this.el&&a.id;this.css=this.el&&a.style},getPosX:function(a){return Ext.Element.getX(a)},getPosY:function(a){return Ext.Element.getY(a)},swapNode:function(c,a){if(c.swapNode){c.swapNode(a)}else{var d=a.parentNode,b=a.nextSibling;if(b==c){d.insertBefore(c,a)}else{if(a==c.nextSibling){d.insertBefore(a,c)}else{c.parentNode.replaceChild(a,c);d.insertBefore(c,b)}}}},getScroll:function(){var d=window.document,e=d.documentElement,a=d.body,c=0,b=0;if(Ext.isGecko4){c=window.scrollYOffset;b=window.scrollXOffset}else{if(e&&(e.scrollTop||e.scrollLeft)){c=e.scrollTop;b=e.scrollLeft}else{if(a){c=a.scrollTop;b=a.scrollLeft}}}return{top:c,left:b}},getStyle:function(b,a){return Ext.fly(b).getStyle(a)},getScrollTop:function(){return this.getScroll().top},getScrollLeft:function(){return this.getScroll().left},moveToEl:function(a,c){var b=Ext.Element.getXY(c);Ext.Element.setXY(a,b)},numericSort:function(d,c){return(d-c)},_timeoutCount:0,_addListeners:function(){if(document){this._onLoad()}else{if(this._timeoutCount<=2000){setTimeout(this._addListeners,10);if(document&&document.body){this._timeoutCount+=1}}}},handleWasClicked:function(a,c){if(this.isHandle(c,a.id)){return true}else{var b=a.parentNode;while(b){if(this.isHandle(c,b.id)){return true}else{b=b.parentNode}}}return false}},function(){this._addListeners()});Ext.define("Ext.layout.container.Box",{alias:["layout.box"],extend:Ext.layout.container.Container,alternateClassName:"Ext.layout.BoxLayout",defaultMargins:{top:0,right:0,bottom:0,left:0},padding:0,pack:"start",flex:undefined,stretchMaxPartner:undefined,alignRoundingMethod:"round",type:"box",scrollOffset:0,itemCls:Ext.baseCSSPrefix+"box-item",targetCls:Ext.baseCSSPrefix+"box-layout-ct",targetElCls:Ext.baseCSSPrefix+"box-target",innerCls:Ext.baseCSSPrefix+"box-inner",availableSpaceOffset:0,reserveOffset:true,manageMargins:true,createsInnerCt:true,childEls:["innerCt","targetEl"],renderTpl:["{%var oc,l=values.$comp.layout,oh=l.overflowHandler;","if (oh.getPrefixConfig!==Ext.emptyFn) {","if(oc=oh.getPrefixConfig())dh.generateMarkup(oc, out)","}%}",'<div id="{ownerId}-innerCt" class="{[l.innerCls]} {[oh.getOverflowCls()]}" role="presentation">','<div id="{ownerId}-targetEl" class="{targetElCls}">',"{%this.renderBody(out, values)%}","</div>","</div>","{%if (oh.getSuffixConfig!==Ext.emptyFn) {","if(oc=oh.getSuffixConfig())dh.generateMarkup(oc, out)","}%}",{disableFormats:true,definitions:"var dh=Ext.DomHelper;"}],constructor:function(a){var c=this,b;c.callParent(arguments);c.flexSortFn=Ext.Function.bind(c.flexSort,c);c.initOverflowHandler();b=typeof c.padding;if(b=="string"||b=="number"){c.padding=Ext.util.Format.parseBox(c.padding);c.padding.height=c.padding.top+c.padding.bottom;c.padding.width=c.padding.left+c.padding.right}},_percentageRe:/^\s*(\d+(?:\.\d*)?)\s*[%]\s*$/,getItemSizePolicy:function(o,p){var k=this,i=k.sizePolicy,h=k.align,g=o.flex,m=h,j=k.names,b=o[j.width],n=o[j.height],d=k._percentageRe,c=d.test(b),e=(h=="stretch"),a=(h=="stretchmax"),l=k.constrainAlign;if(!p&&(e||g||c||(l&&!a))){p=k.owner.getSizeModel()}if(e){if(!d.test(n)&&p[j.height].shrinkWrap){m="stretchmax"}}else{if(!a){if(d.test(n)){m="stretch"}else{if(l&&!p[j.height].shrinkWrap){m="stretchmax"}else{m=""}}}}if(g||c){if(!p[j.width].shrinkWrap){i=i.flex}}return i[m]},flexSort:function(m,l){var j=this.names.maxWidth,e=this.names.minWidth,k=Infinity,i=m.target,p=l.target,q=0,c,n,h,d,o,g;h=i[j]||k;d=p[j]||k;c=i[e]||0;n=p[e]||0;o=isFinite(c)||isFinite(n);g=isFinite(h)||isFinite(d);if(o||g){if(g){q=h-d}if(q===0&&o){q=n-c}}return q},isItemBoxParent:function(a){return true},isItemShrinkWrap:function(a){return true},roundFlex:function(a){return Math.ceil(a)},beginCollapse:function(b){var a=this;if(a.direction==="vertical"&&b.collapsedVertical()){b.collapseMemento.capture(["flex"]);delete b.flex}else{if(a.direction==="horizontal"&&b.collapsedHorizontal()){b.collapseMemento.capture(["flex"]);delete b.flex}}},beginExpand:function(a){a.collapseMemento.restore(["flex"])},beginLayout:function(d){var c=this,a=c.owner,g=a.stretchMaxPartner,b=c.innerCt.dom.style,e=c.names;d.boxNames=e;c.overflowHandler.beginLayout(d);if(typeof g==="string"){g=Ext.getCmp(g)||a.query(g)[0]}d.stretchMaxPartner=g&&d.context.getCmp(g);c.callParent(arguments);d.innerCtContext=d.getEl("innerCt",c);c.scrollParallel=a.scrollFlags[e.x];c.scrollPerpendicular=a.scrollFlags[e.y];if(c.scrollParallel){c.scrollPos=a.getTargetEl().dom[e.scrollLeft]}b.width="";b.height=""},beginLayoutCycle:function(e,a){var d=this,h=d.align,g=e.boxNames,b=d.pack,c=g.heightModel;d.overflowHandler.beginLayoutCycle(e,a);d.callParent(arguments);e.parallelSizeModel=e[g.widthModel];e.perpendicularSizeModel=e[c];e.boxOptions={align:h={stretch:h=="stretch",stretchmax:h=="stretchmax",center:h==g.center,bottom:h==g.afterY},pack:b={center:b=="center",end:b=="end"}};if(h.stretch&&e.perpendicularSizeModel.shrinkWrap){h.stretchmax=true;h.stretch=false}h.nostretch=!(h.stretch||h.stretchmax);if(e.parallelSizeModel.shrinkWrap){b.center=b.end=false}d.cacheFlexes(e);d.targetEl.setWidth(20000)},cacheFlexes:function(k){var u=this,l=k.boxNames,a=l.widthModel,d=l.heightModel,c=k.boxOptions.align.nostretch,o=0,b=k.childItems,q=b.length,s=[],m=0,j=l.minWidth,g=u._percentageRe,r=0,t=0,e,n,p,h;while(q--){n=b[q];e=n.target;if(n[a].calculated){n.flex=p=e.flex;if(p){o+=p;s.push(n);m+=e[j]||0}else{h=g.exec(e[l.width]);n.percentageParallel=parseFloat(h[1])/100;++r}}if(c&&n[d].calculated){h=g.exec(e[l.height]);n.percentagePerpendicular=parseFloat(h[1])/100;++t}}k.flexedItems=s;k.flexedMinSize=m;k.totalFlex=o;k.percentageWidths=r;k.percentageHeights=t;Ext.Array.sort(s,u.flexSortFn)},calculate:function(e){var c=this,b=c.getContainerSize(e),h=e.boxNames,d=e.state,g=d.boxPlan||(d.boxPlan={}),a=e.targetContext;g.targetSize=b;if(!e.parallelSizeModel.shrinkWrap&&!b[h.gotWidth]){c.done=false;return}if(!d.parallelDone){d.parallelDone=c.calculateParallel(e,h,g)}if(!d.perpendicularDone){d.perpendicularDone=c.calculatePerpendicular(e,h,g)}if(d.parallelDone&&d.perpendicularDone){if(c.owner.dock&&(Ext.isIE7m||Ext.isIEQuirks)&&!c.owner.width&&!c.horizontal){g.isIEVerticalDock=true;g.calculatedWidth=g.maxSize+e.getPaddingInfo().width+e.getFrameInfo().width;if(a!==e){g.calculatedWidth+=a.getPaddingInfo().width}}c.publishInnerCtSize(e,c.reserveOffset?c.availableSpaceOffset:0);if(c.done&&(e.childItems.length>1||e.stretchMaxPartner)&&e.boxOptions.align.stretchmax&&!d.stretchMaxDone){c.calculateStretchMax(e,h,g);d.stretchMaxDone=true}c.overflowHandler.calculate(e)}else{c.done=false}},calculateParallel:function(k,n,b){var F=this,z=n.width,a=k.childItems,s=n.beforeX,d=n.afterX,q=n.setWidth,A=a.length,x=k.flexedItems,r=x.length,v=k.boxOptions.pack,m=F.padding,h=b.targetSize[z],B=0,e=m[s],E=e+m[d]+F.scrollOffset+(F.reserveOffset?F.availableSpaceOffset:0),w=Ext.getScrollbarSize()[n.width],u,l,g,y,o,t,D,p,C,c,j;if(w&&F.scrollPerpendicular&&k.parallelSizeModel.shrinkWrap&&!k.boxOptions.align.stretch&&!k.perpendicularSizeModel.shrinkWrap){if(!k.state.perpendicularDone){return false}C=true}for(u=0;u<A;++u){o=a[u];l=o.marginInfo||o.getMarginInfo();B+=l[z];if(!o[n.widthModel].calculated){c=o.getProp(z);E+=c;if(isNaN(E)){return false}}}E+=B;if(k.percentageWidths){j=h-B;if(isNaN(j)){return false}for(u=0;u<A;++u){o=a[u];if(o.percentageParallel){c=Math.ceil(j*o.percentageParallel);c=o.setWidth(c);E+=c}}}if(k.parallelSizeModel.shrinkWrap){b.availableSpace=0;b.tooNarrow=false}else{b.availableSpace=h-E;b.tooNarrow=b.availableSpace<k.flexedMinSize;if(b.tooNarrow&&Ext.getScrollbarSize()[n.height]&&F.scrollParallel&&k.state.perpendicularDone){k.state.perpendicularDone=false;for(u=0;u<A;++u){a[u].invalidate()}}}p=E;g=b.availableSpace;y=k.totalFlex;for(u=0;u<r;u++){o=x[u];t=o.flex;D=F.roundFlex((t/y)*g);D=o[q](D);p+=D;g=Math.max(0,g-D);y-=t}if(v.center){e+=g/2;if(e<0){e=0}}else{if(v.end){e+=g}}for(u=0;u<A;++u){o=a[u];l=o.marginInfo;e+=l[s];o.setProp(n.x,e);e+=l[d]+o.props[z]}p+=k.targetContext.getPaddingInfo()[z];k.state.contentWidth=p;if(C&&(k.peek(n.contentHeight)>b.targetSize[n.height])){p+=w;k[n.hasOverflowY]=true;k.target.componentLayout[n.setWidthInDom]=true;k[n.invalidateScrollY]=Ext.isStrict&&Ext.isIE8}k[n.setContentWidth](p);return true},calculatePerpendicular:function(u,K,z){var t=this,d=u.perpendicularSizeModel.shrinkWrap,b=z.targetSize,j=u.childItems,y=j.length,m=Math.max,l=K.height,n=K.setHeight,h=K.beforeY,s=K.y,H=t.padding,k=H[h],o=b[l]-k-H[K.afterY],E=u.boxOptions.align,p=E.stretch,q=E.stretchmax,N=E.center,M=E.bottom,G=t.constrainAlign,F=0,B=0,D=t.onBeforeConstrainInvalidateChild,A=t.onAfterConstrainInvalidateChild,a=Ext.getScrollbarSize().height,x,I,C,v,w,c,r,e,L,J,g;if(p||((N||M)&&!d)){if(isNaN(o)){return false}}if(t.scrollParallel&&z.tooNarrow){if(d){J=true}else{o-=a;z.targetSize[l]-=a}}if(p){c=o}else{for(I=0;I<y;I++){r=j[I];v=(r.marginInfo||r.getMarginInfo())[l];if(!(g=r.percentagePerpendicular)){C=r.getProp(l)}else{++B;if(d){continue}else{C=g*o-v;C=r[K.setHeight](C)}}if(!d&&G&&r[K.heightModel].shrinkWrap&&C>o){r.invalidate({before:D,after:A,layout:t,childHeight:o,names:K});u.state.parallelDone=false}if(isNaN(F=m(F,C+v,r.target[K.minHeight]||0))){return false}}if(J){F+=a;u[K.hasOverflowX]=true;u.target.componentLayout[K.setHeightInDom]=true;u[K.invalidateScrollX]=Ext.isStrict&&Ext.isIE8}e=u.stretchMaxPartner;if(e){u.setProp("maxChildHeight",F);L=e.childItems;if(L&&L.length){F=m(F,e.getProp("maxChildHeight"));if(isNaN(F)){return false}}}u[K.setContentHeight](F+t.padding[l]+u.targetContext.getPaddingInfo()[l]);if(J){F-=a}z.maxSize=F;if(q){c=F}else{if(N||M||B){if(G){c=d?F:o}else{c=d?F:m(o,F)}c-=u.innerCtContext.getBorderInfo()[l]}}}for(I=0;I<y;I++){r=j[I];v=r.marginInfo||r.getMarginInfo();x=k+v[h];if(p){r[n](c-v[l])}else{g=r.percentagePerpendicular;if(d&&g){v=r.marginInfo||r.getMarginInfo();C=g*c-v[l];C=r.setHeight(C)}if(N){w=c-r.props[l];if(w>0){x=k+Math[t.alignRoundingMethod](w/2)}}else{if(M){x=m(0,c-x-r.props[l])}}}r.setProp(s,x)}return true},onBeforeConstrainInvalidateChild:function(b,a){var c=a.names.heightModel;if(!b[c].constrainedMin){b[c]=Ext.layout.SizeModel.calculated}},onAfterConstrainInvalidateChild:function(b,a){var c=a.names;b.setProp(c.beforeY,0);if(b[c.heightModel].calculated){b[c.setHeight](a.childHeight)}},calculateStretchMax:function(c,k,m){var l=this,h=k.height,n=k.width,g=c.childItems,a=g.length,p=m.maxSize,o=l.onBeforeStretchMaxInvalidateChild,e=l.onAfterStretchMaxInvalidateChild,q,j,d,b;for(d=0;d<a;++d){q=g[d];j=q.props;b=p-q.getMarginInfo()[h];if(b!=j[h]||q[k.heightModel].constrained){q.invalidate({before:o,after:e,layout:l,childWidth:j[n],childHeight:b,childX:j.x,childY:j.y,names:k})}}},onBeforeStretchMaxInvalidateChild:function(b,a){var c=a.names.heightModel;if(!b[c].constrainedMax){b[c]=Ext.layout.SizeModel.calculated}},onAfterStretchMaxInvalidateChild:function(d,c){var e=c.names,a=c.childHeight,b=c.childWidth;d.setProp("x",c.childX);d.setProp("y",c.childY);if(d[e.heightModel].calculated){d[e.setHeight](a)}if(d[e.widthModel].calculated){d[e.setWidth](b)}},completeLayout:function(b){var j=this,i=b.boxNames,h=b.invalidateScrollX,g=b.invalidateScrollY,d,a,e,c,k;j.overflowHandler.completeLayout(b);if(h||g){a=j.getTarget();d=a.dom;k=d.style;if(h){e=a.getStyle("overflowX");if(e=="auto"){e=k.overflowX;k.overflowX="scroll"}else{h=false}}if(g){c=a.getStyle("overflowY");if(c=="auto"){c=k.overflowY;k.overflowY="scroll"}else{g=false}}if(h||g){d.scrollWidth;if(h){k.overflowX=e}if(g){k.overflowY=c}}}if(j.scrollParallel){j.owner.getTargetEl().dom[i.scrollLeft]=j.scrollPos}},finishedLayout:function(a){this.overflowHandler.finishedLayout(a);this.callParent(arguments);this.targetEl.setWidth(a.innerCtContext.props.width)},publishInnerCtSize:function(a,d){var i=this,h=a.boxNames,g=h.height,k=h.width,e=a.boxOptions.align,o=i.owner.dock,l=i.padding,j=a.state.boxPlan,c=j.targetSize,n=c[g],p=a.innerCtContext,b=(a.parallelSizeModel.shrinkWrap||(j.tooNarrow&&i.scrollParallel)?a.state.contentWidth-a.targetContext.getPaddingInfo()[k]:c[k])-(d||0),m;if(e.stretch){m=n}else{m=j.maxSize+l[h.beforeY]+l[h.afterY]+p.getBorderInfo()[g];if(!a.perpendicularSizeModel.shrinkWrap&&(e.center||e.bottom)){m=Math.max(n,m)}}p[h.setWidth](b);p[h.setHeight](m);if(isNaN(b+m)){i.done=false}if(j.calculatedWidth&&(o=="left"||o=="right")){a.setWidth(j.calculatedWidth,true,true)}},onRemove:function(a){var b=this;b.callParent(arguments);if(b.overflowHandler){b.overflowHandler.onRemove(a)}if(a.layoutMarginCap==b.id){delete a.layoutMarginCap}},initOverflowHandler:function(){var d=this,c=d.overflowHandler,b,a;if(typeof c=="string"){c={type:c}}b="None";if(c&&c.type!==undefined){b=c.type}a=Ext.layout.container.boxOverflow[b];if(a[d.type]){a=a[d.type]}d.overflowHandler=Ext.create("Ext.layout.container.boxOverflow."+b,d,c)},getRenderTarget:function(){return this.targetEl},getElementTarget:function(){return this.innerCt},destroy:function(){Ext.destroy(this.innerCt,this.overflowHandler);this.callParent(arguments)},getRenderData:function(){var a=this.callParent();a.targetElCls=this.targetElCls;return a}});Ext.define("Ext.layout.container.HBox",{alias:["layout.hbox"],extend:Ext.layout.container.Box,alternateClassName:"Ext.layout.HBoxLayout",align:"top",constrainAlign:false,type:"hbox",direction:"horizontal",horizontal:true,names:{beforeX:"left",leftCap:"Left",afterX:"right",width:"width",contentWidth:"contentWidth",minWidth:"minWidth",maxWidth:"maxWidth",widthCap:"Width",widthModel:"widthModel",widthIndex:0,x:"x",scrollLeft:"scrollLeft",overflowX:"overflowX",hasOverflowX:"hasOverflowX",invalidateScrollX:"invalidateScrollX",parallelMargins:"lr",center:"middle",beforeY:"top",afterY:"bottom",height:"height",contentHeight:"contentHeight",minHeight:"minHeight",maxHeight:"maxHeight",heightCap:"Height",heightModel:"heightModel",heightIndex:1,y:"y",scrollTop:"scrollTop",overflowY:"overflowY",hasOverflowY:"hasOverflowY",invalidateScrollY:"invalidateScrollY",perpendicularMargins:"tb",getWidth:"getWidth",getHeight:"getHeight",setWidth:"setWidth",setHeight:"setHeight",gotWidth:"gotWidth",gotHeight:"gotHeight",setContentWidth:"setContentWidth",setContentHeight:"setContentHeight",setWidthInDom:"setWidthInDom",setHeightInDom:"setHeightInDom"},sizePolicy:{flex:{"":{readsWidth:0,readsHeight:1,setsWidth:1,setsHeight:0},stretch:{readsWidth:0,readsHeight:0,setsWidth:1,setsHeight:1},stretchmax:{readsWidth:0,readsHeight:1,setsWidth:1,setsHeight:1}},"":{readsWidth:1,readsHeight:1,setsWidth:0,setsHeight:0},stretch:{readsWidth:1,readsHeight:0,setsWidth:0,setsHeight:1},stretchmax:{readsWidth:1,readsHeight:1,setsWidth:0,setsHeight:1}}});Ext.define("Ext.layout.container.VBox",{alias:["layout.vbox"],extend:Ext.layout.container.Box,alternateClassName:"Ext.layout.VBoxLayout",align:"left",constrainAlign:false,type:"vbox",direction:"vertical",horizontal:false,names:{beforeX:"top",leftCap:"Top",afterX:"bottom",width:"height",contentWidth:"contentHeight",minWidth:"minHeight",maxWidth:"maxHeight",widthCap:"Height",widthModel:"heightModel",widthIndex:1,x:"y",scrollLeft:"scrollTop",overflowX:"overflowY",hasOverflowX:"hasOverflowY",invalidateScrollX:"invalidateScrollY",parallelMargins:"tb",center:"center",beforeY:"left",afterY:"right",height:"width",contentHeight:"contentWidth",minHeight:"minWidth",maxHeight:"maxWidth",heightCap:"Width",heightModel:"widthModel",heightIndex:0,y:"x",scrollTop:"scrollLeft",overflowY:"overflowX",hasOverflowY:"hasOverflowX",invalidateScrollY:"invalidateScrollX",perpendicularMargins:"lr",getWidth:"getHeight",getHeight:"getWidth",setWidth:"setHeight",setHeight:"setWidth",gotWidth:"gotHeight",gotHeight:"gotWidth",setContentWidth:"setContentHeight",setContentHeight:"setContentWidth",setWidthInDom:"setHeightInDom",setHeightInDom:"setWidthInDom"},sizePolicy:{flex:{"":{readsWidth:1,readsHeight:0,setsWidth:0,setsHeight:1},stretch:{readsWidth:0,readsHeight:0,setsWidth:1,setsHeight:1},stretchmax:{readsWidth:1,readsHeight:0,setsWidth:1,setsHeight:1}},"":{readsWidth:1,readsHeight:1,setsWidth:0,setsHeight:0},stretch:{readsWidth:0,readsHeight:1,setsWidth:1,setsHeight:0},stretchmax:{readsWidth:1,readsHeight:1,setsWidth:1,setsHeight:0}}});Ext.define("Ext.toolbar.Toolbar",{extend:Ext.container.Container,alias:"widget.toolbar",alternateClassName:"Ext.Toolbar",isToolbar:true,baseCls:Ext.baseCSSPrefix+"toolbar",ariaRole:"toolbar",defaultType:"button",vertical:false,enableOverflow:false,menuTriggerCls:Ext.baseCSSPrefix+"toolbar-more-icon",trackMenus:true,itemCls:Ext.baseCSSPrefix+"toolbar-item",statics:{shortcuts:{"-":"tbseparator"," ":"tbspacer"},shortcutsHV:{0:{"->":{xtype:"tbfill",height:0}},1:{"->":{xtype:"tbfill",width:0}}}},initComponent:function(){var a=this;if(!a.layout&&a.enableOverflow){a.layout={overflowHandler:"Menu"}}if(a.dock==="right"||a.dock==="left"){a.vertical=true}a.layout=Ext.applyIf(Ext.isString(a.layout)?{type:a.layout}:a.layout||{},{type:a.vertical?"vbox":"hbox",align:a.vertical?"stretchmax":"middle"});if(a.vertical){a.addClsWithUI("vertical")}if(a.ui==="footer"){a.ignoreBorderManagement=true}a.callParent();a.addEvents("overflowchange")},getRefItems:function(a){var e=this,b=e.callParent(arguments),d=e.layout,c;if(a&&e.enableOverflow){c=d.overflowHandler;if(c&&c.menu){b=b.concat(c.menu.getRefItems(a))}}return b},lookupComponent:function(e){var d=arguments;if(typeof e=="string"){var b=Ext.toolbar.Toolbar,a=b.shortcutsHV[this.vertical?1:0][e]||b.shortcuts[e];if(typeof a=="string"){e={xtype:a}}else{if(a){e=Ext.apply({},a)}else{e={xtype:"tbtext",text:e}}}this.applyDefaults(e);d=[e]}return this.callParent(d)},applyDefaults:function(a){if(!Ext.isString(a)){a=this.callParent(arguments)}return a},trackMenu:function(c,a){if(this.trackMenus&&c.menu){var d=a?"mun":"mon",b=this;b[d](c,"mouseover",b.onButtonOver,b);b[d](c,"menushow",b.onButtonMenuShow,b);b[d](c,"menuhide",b.onButtonMenuHide,b)}},onBeforeAdd:function(b){var c=this,a=b.isButton;if(a&&c.defaultButtonUI&&b.ui==="default"&&!b.hasOwnProperty("ui")){b.ui=c.defaultButtonUI}else{if((a||b.isFormField)&&c.ui!=="footer"){b.ui=b.ui+"-toolbar"}}if(b instanceof Ext.toolbar.Separator){b.setUI((c.vertical)?"vertical":"horizontal")}c.callParent(arguments)},onAdd:function(a){this.callParent(arguments);this.trackMenu(a)},onRemove:function(a){this.callParent(arguments);this.trackMenu(a,true)},getChildItemsToDisable:function(){return this.items.getRange()},onButtonOver:function(a){if(this.activeMenuBtn&&this.activeMenuBtn!=a){this.activeMenuBtn.hideMenu();a.showMenu();this.activeMenuBtn=a}},onButtonMenuShow:function(a){this.activeMenuBtn=a},onButtonMenuHide:function(a){delete this.activeMenuBtn}});Ext.define("Ext.layout.component.Dock",{extend:Ext.layout.component.Component,alias:"layout.dock",alternateClassName:"Ext.layout.component.AbstractDock",type:"dock",horzAxisProps:{name:"horz",oppositeName:"vert",dockBegin:"left",dockEnd:"right",horizontal:true,marginBegin:"margin-left",maxSize:"maxWidth",minSize:"minWidth",pos:"x",setSize:"setWidth",shrinkWrapDock:"shrinkWrapDockWidth",size:"width",sizeModel:"widthModel"},vertAxisProps:{name:"vert",oppositeName:"horz",dockBegin:"top",dockEnd:"bottom",horizontal:false,marginBegin:"margin-top",maxSize:"maxHeight",minSize:"minHeight",pos:"y",setSize:"setHeight",shrinkWrapDock:"shrinkWrapDockHeight",size:"height",sizeModel:"heightModel"},initializedBorders:-1,horizontalCollapsePolicy:{width:true,x:true},verticalCollapsePolicy:{height:true,y:true},finishRender:function(){var b=this,c,a;b.callParent();c=b.getRenderTarget();a=b.getDockedItems();b.finishRenderItems(c,a)},isItemBoxParent:function(a){return true},isItemShrinkWrap:function(a){return true},noBorderClasses:[Ext.baseCSSPrefix+"docked-noborder-top",Ext.baseCSSPrefix+"docked-noborder-right",Ext.baseCSSPrefix+"docked-noborder-bottom",Ext.baseCSSPrefix+"docked-noborder-left"],noBorderClassesSides:{top:Ext.baseCSSPrefix+"docked-noborder-top",right:Ext.baseCSSPrefix+"docked-noborder-right",bottom:Ext.baseCSSPrefix+"docked-noborder-bottom",left:Ext.baseCSSPrefix+"docked-noborder-left"},borderWidthProps:{top:"border-top-width",right:"border-right-width",bottom:"border-bottom-width",left:"border-left-width"},handleItemBorders:function(){var n=this,a=n.owner,m,r,j=n.lastDockedItems,h=n.borders,b=a.dockedItems.generation,c=n.noBorderClassesSides,o=n.borderWidthProps,g,l,q,p,k,d,e=n.collapsed;if(n.initializedBorders==b||(a.border&&!a.manageBodyBorders)){return}n.initializedBorders=b;n.collapsed=false;n.lastDockedItems=r=n.getLayoutItems();n.collapsed=e;m={top:[],right:[],bottom:[],left:[]};for(g=0,l=r.length;g<l;g++){q=r[g];p=q.dock;if(q.ignoreBorderManagement){continue}if(!m[p].satisfied){m[p].push(q);m[p].satisfied=true}if(!m.top.satisfied&&p!=="bottom"){m.top.push(q)}if(!m.right.satisfied&&p!=="left"){m.right.push(q)}if(!m.bottom.satisfied&&p!=="top"){m.bottom.push(q)}if(!m.left.satisfied&&p!=="right"){m.left.push(q)}}if(j){for(g=0,l=j.length;g<l;g++){q=j[g];if(!q.isDestroyed&&!q.ignoreBorderManagement&&!a.manageBodyBorders){q.removeCls(n.noBorderClasses)}}}if(h){for(k in h){if(a.manageBodyBorders&&h[k].satisfied){a.setBodyStyle(o[k],"")}}}for(k in m){l=m[k].length;if(!a.manageBodyBorders){for(g=0;g<l;g++){m[k][g].addCls(c[k])}if((!m[k].satisfied&&!a.bodyBorder)||a.bodyBorder===false){a.addBodyCls(c[k])}}else{if(m[k].satisfied){a.setBodyStyle(o[k],"1px")}}}n.borders=m},beforeLayoutCycle:function(g){var c=this,b=c.owner,h=c.sizeModels.shrinkWrap,e=b.shrinkWrapDock,d,a;if(b.collapsed){if(b.collapsedVertical()){a=true;g.measureDimensions=1}else{d=true;g.measureDimensions=2}}g.collapsedVert=a;g.collapsedHorz=d;if(a){g.heightModel=h}else{if(d){g.widthModel=h}}e=e===true?3:(e||0);g.shrinkWrapDockHeight=(e&1)&&g.heightModel.shrinkWrap;g.shrinkWrapDockWidth=(e&2)&&g.widthModel.shrinkWrap},beginLayout:function(d){var k=this,c=k.owner,o=k.getLayoutItems(),b=d.context,g=o.length,l,j,n,a,e,h,m;k.callParent(arguments);h=c.getCollapsed();if(h!==k.lastCollapsedState&&Ext.isDefined(k.lastCollapsedState)){if(k.owner.collapsed){d.isCollapsingOrExpanding=1;c.addClsWithUI(c.collapsedCls)}else{d.isCollapsingOrExpanding=2;c.removeClsWithUI(c.collapsedCls);d.lastCollapsedState=k.lastCollapsedState}}k.lastCollapsedState=h;d.dockedItems=l=[];for(j=0;j<g;j++){n=o[j];if(n.rendered){m=n.dock;a=b.getCmp(n);a.dockedAt={x:0,y:0};a.offsets=e=Ext.Element.parseBox(n.offsets||0);a.horizontal=m=="top"||m=="bottom";e.width=e.left+e.right;e.height=e.top+e.bottom;l.push(a)}}d.bodyContext=d.getEl("body")},beginLayoutCycle:function(b){var e=this,l=b.dockedItems,d=l.length,a=e.owner,g=a.frameBody,k=e.lastHeightModel,c,j,h;e.callParent(arguments);if(e.owner.manageHeight){if(e.lastBodyDisplay){a.body.dom.style.display=e.lastBodyDisplay=""}}else{if(e.lastBodyDisplay!=="inline-block"){a.body.dom.style.display=e.lastBodyDisplay="inline-block"}if(k&&k.shrinkWrap&&!b.heightModel.shrinkWrap){a.body.dom.style.marginBottom=""}}if(b.widthModel.auto){if(b.widthModel.shrinkWrap){a.el.setWidth(null)}a.body.setWidth(null);if(g){g.setWidth(null)}}if(b.heightModel.auto){a.body.setHeight(null);if(g){g.setHeight(null)}}if(b.collapsedVert){b.setContentHeight(0)}else{if(b.collapsedHorz){b.setContentWidth(0)}}for(c=0;c<d;c++){j=l[c].target;h=j.dock;if(h=="right"){j.setLocalX(0)}else{if(h!="left"){continue}}}},calculate:function(d){var l=this,c=l.measureAutoDimensions(d,d.measureDimensions),b=d.state,k=b.horzDone,e=b.vertDone,g=d.bodyContext,j,a,i,h,m;d.borderInfo||d.getBorderInfo();d.paddingInfo||d.getPaddingInfo();d.frameInfo||d.getFrameInfo();g.borderInfo||g.getBorderInfo();g.paddingInfo||g.getPaddingInfo();if(!d.frameBorder){if(!(j=d.framing)){d.frameBorder=d.borderInfo;d.framePadding=d.paddingInfo}else{d.frameBorder=j.border;d.framePadding=j.padding}}a=!k&&l.createAxis(d,c.contentWidth,d.widthModel,l.horzAxisProps,d.collapsedHorz);i=!e&&l.createAxis(d,c.contentHeight,d.heightModel,l.vertAxisProps,d.collapsedVert);for(h=0,m=d.dockedItems.length;m--;++h){if(a){l.dockChild(d,a,m,h)}if(i){l.dockChild(d,i,m,h)}}if(a&&l.finishAxis(d,a)){b.horzDone=k=a}if(i&&l.finishAxis(d,i)){b.vertDone=e=i}if(k&&e&&l.finishConstraints(d,k,e)){l.finishPositions(d,k,e)}else{l.done=false}},createAxis:function(p,j,e,m,d){var u=this,t=0,b=u.owner,g=b[m.maxSize],c=b[m.minSize]||0,n=m.dockBegin,i=m.dockEnd,r=m.pos,l=m.size,k=g!=null,o=e.shrinkWrap,a,s,q,h;if(o){if(d){h=0}else{a=p.bodyContext;h=j+a.borderInfo[l]}}else{s=p.frameBorder;q=p.framePadding;t=s[n]+q[n];h=p.getProp(l)-(s[i]+q[i])}return{shrinkWrap:e.shrinkWrap,sizeModel:e,initialBegin:t,begin:t,end:h,collapsed:d,horizontal:m.horizontal,ignoreFrameBegin:null,ignoreFrameEnd:null,initialSize:h-t,maxChildSize:0,hasMinMaxConstraints:(c||k)&&e.shrinkWrap,minSize:c,maxSize:k?g:1000000000,bodyPosProp:u.owner.manageHeight?r:m.marginBegin,dockBegin:n,dockEnd:i,posProp:r,sizeProp:l,setSize:m.setSize,shrinkWrapDock:p[m.shrinkWrapDock],sizeModelName:m.sizeModel,dockedPixelsEnd:0}},dockChild:function(b,c,l,e){var g=this,a=b.dockedItems[c.shrinkWrap?l:e],i=a.target,j=i.dock,d=c.sizeProp,h,k;if(i.ignoreParentFrame&&b.isCollapsingOrExpanding){a.clearMarginCache()}a.marginInfo||a.getMarginInfo();if(j==c.dockBegin){if(c.shrinkWrap){h=g.dockOutwardBegin(b,a,i,c)}else{h=g.dockInwardBegin(b,a,i,c)}}else{if(j==c.dockEnd){if(c.shrinkWrap){h=g.dockOutwardEnd(b,a,i,c)}else{h=g.dockInwardEnd(b,a,i,c)}}else{if(c.shrinkWrapDock){k=a.getProp(d)+a.marginInfo[d];c.maxChildSize=Math.max(c.maxChildSize,k);h=0}else{h=g.dockStretch(b,a,i,c)}}}a.dockedAt[c.posProp]=h},dockInwardBegin:function(b,a,j,d){var g=d.begin,e=d.sizeProp,c=j.ignoreParentFrame,h,k,i;if(c){d.ignoreFrameBegin=a;i=j.dock;h=b.frameBorder[i];g-=h+b.framePadding[i]}if(!j.overlay){k=a.getProp(e)+a.marginInfo[e];d.begin+=k;if(c){d.begin-=h}}return g},dockInwardEnd:function(e,d,c,b){var i=b.sizeProp,a=d.getProp(i)+d.marginInfo[i],h=b.end-a,g;if(!c.overlay){b.end=h}if(c.ignoreParentFrame){b.ignoreFrameEnd=d;g=e.frameBorder[c.dock];h+=g+e.framePadding[c.dock];b.end+=g}return h},dockOutwardBegin:function(e,d,c,b){var h=b.begin,g=b.sizeProp,a;if(b.collapsed){b.ignoreFrameBegin=b.ignoreFrameEnd=d}else{if(c.ignoreParentFrame){b.ignoreFrameBegin=d}}if(!c.overlay){a=d.getProp(g)+d.marginInfo[g];h-=a;b.begin=h}return h},dockOutwardEnd:function(e,d,c,b){var h=b.end,g=b.sizeProp,a;a=d.getProp(g)+d.marginInfo[g];if(b.collapsed){b.ignoreFrameBegin=b.ignoreFrameEnd=d}else{if(c.ignoreParentFrame){b.ignoreFrameEnd=d}}if(!c.overlay){b.end=h+a;b.dockedPixelsEnd+=a}return h},dockStretch:function(c,b,m,d){var n=m.dock,j=d.sizeProp,a=n=="top"||n=="bottom",i=c.frameBorder,e=b.offsets,l=c.framePadding,h=a?"right":"bottom",p=a?"left":"top",k=d.begin+e[p],g,o;if(m.stretch!==false){o=d.end-k-e[h];if(m.ignoreParentFrame){k-=l[p]+i[p];o+=l[j]+i[j]}g=b.marginInfo;o-=g[j];b[d.setSize](o)}return k},finishAxis:function(m,e){if(isNaN(e.maxChildSize)){return false}var d=e.begin,p=e.end-d,h=e.collapsed,w=e.setSize,k=e.dockBegin,u=e.dockEnd,o=m.framePadding,r=m.frameBorder,g=r[k],s=m.framing,n=s&&s[k],b=h?0:o[k],j=e.sizeProp,t=e.ignoreFrameBegin,q=e.ignoreFrameEnd,a=m.bodyContext,l=Math.max(g+b-n,0),c,x,v,i;if(e.shrinkWrap){x=e.initialSize;if(s){v=-d+g+b;c=v-n-l}else{c=-d;v=c+b}if(!h){p+=o[j]}if(t){v-=g;c-=g;t.dockedAt[e.posProp]-=b}else{p+=g}if(h){}else{if(q){q.dockedAt[e.posProp]+=o[u]}else{p+=r[u]}}e.size=p;if(!e.horizontal&&!this.owner.manageHeight){i=false}}else{if(s){v=0;c=d-n-l}else{v=-g;c=d-b-g}x=p}e.delta=v;a[w](x,i);a.setProp(e.bodyPosProp,c);return !isNaN(p)},beforeInvalidateShrinkWrapDock:function(c,b){var a=b.axis.sizeModelName;if(!c[a].constrainedMin){c[a]=Ext.layout.SizeModel.calculated}},afterInvalidateShrinkWrapDock:function(d,a){var b=a.axis,c=a.layout,e;if(d[b.sizeModelName].calculated){e=c.dockStretch(a.ownerContext,d,d.target,b);d.setProp(b.posProp,b.delta+e)}},finishConstraints:function(k,c,p){var s=this,r=s.sizeModels,o=c.shrinkWrap,q=p.shrinkWrap,a=s.owner,i,m,n,g,h,l,b,d,e,j;if(o){l=c.size;b=c.collapsed?0:c.minSize;d=c.maxSize;e=c.maxChildSize;j=Math.max(l,e);if(j>d){h=r.constrainedMax;n=d}else{if(j<b){h=r.constrainedMin;n=b}else{if(l<e){h=r.constrainedDock;a.dockConstrainedWidth=n=e}else{n=l}}}}if(q){l=p.size;b=p.collapsed?0:p.minSize;d=p.maxSize;e=p.maxChildSize;j=Math.max(l,e+l-p.initialSize);if(j>d){g=r.constrainedMax;m=d}else{if(j<b){g=r.constrainedMin;m=b}else{if(l<e){g=r.constrainedDock;a.dockConstrainedHeight=m=e}else{if(!k.collapsedVert&&!a.manageHeight){i=false;k.bodyContext.setProp("margin-bottom",p.dockedPixelsEnd)}m=l}}}}if(h||g){if(h&&g&&h.constrainedMax&&g.constrainedByMin){k.invalidate({widthModel:h});return false}if(!k.widthModel.calculatedFromShrinkWrap&&!k.heightModel.calculatedFromShrinkWrap){k.invalidate({widthModel:h,heightModel:g});return false}}else{s.invalidateAxes(k,c,p)}if(o){k.setWidth(n);if(h){k.widthModel=h}}if(q){k.setHeight(m,i);if(g){k.heightModel=g}}return true},invalidateAxes:function(g,a,l){var p=this.beforeInvalidateShrinkWrapDock,b=this.afterInvalidateShrinkWrapDock,e=a.end-a.begin,s=l.initialSize,c=a.shrinkWrapDock&&a.maxChildSize<e,m=l.shrinkWrapDock&&l.maxChildSize<s,q,n,k,d,r,o,h,j;if(c||m){if(m){l.begin=l.initialBegin;l.end=l.begin+l.initialSize}q=g.dockedItems;for(k=0,n=q.length;k<n;++k){d=q[k];o=d.horizontal;h=null;if(c&&o){j=a.sizeProp;r=e;h=a}else{if(m&&!o){j=l.sizeProp;r=s;h=l}}if(h){r-=d.getMarginInfo()[j];if(r!==d.props[j]){d.invalidate({before:p,after:b,axis:h,ownerContext:g,layout:this})}}}}},finishPositions:function(d,a,h){var j=d.dockedItems,c=j.length,g=a.delta,e=h.delta,i,b;for(i=0;i<c;++i){b=j[i];b.setProp("x",g+b.dockedAt.x);b.setProp("y",e+b.dockedAt.y)}},finishedLayout:function(b){var a=this,c=b.target;a.callParent(arguments);if(!b.animatePolicy){if(b.isCollapsingOrExpanding===1){c.afterCollapse(false)}else{if(b.isCollapsingOrExpanding===2){c.afterExpand(false)}}}},getAnimatePolicy:function(c){var b=this,a,d;if(c.isCollapsingOrExpanding==1){a=b.lastCollapsedState}else{if(c.isCollapsingOrExpanding==2){a=c.lastCollapsedState}}if(a=="left"||a=="right"){d=b.horizontalCollapsePolicy}else{if(a=="top"||a=="bottom"){d=b.verticalCollapsePolicy}}return d},getDockedItems:function(c,n){var j=this,e=(c==="visual"),k=e?Ext.ComponentQuery.query("[rendered]",j.owner.dockedItems.items):j.owner.dockedItems.items,h=k&&k.length&&c!==false,b,m,l,g,d,a;if(n==null){l=h&&!e?k.slice():k}else{l=[];for(g=0,a=k.length;g<a;++g){m=k[g].dock;d=(m=="top"||m=="left");if(n?d:!d){l.push(k[g])}}h=h&&l.length}if(h){b=(c=c||"render")=="render";Ext.Array.sort(l,function(o,i){var p,q;if(b&&((p=j.owner.dockOrder[o.dock])!==(q=j.owner.dockOrder[i.dock]))){if(!(p+q)){return p-q}}p=j.getItemWeight(o,c);q=j.getItemWeight(i,c);if((p!==undefined)&&(q!==undefined)){return p-q}return 0})}return l||[]},getItemWeight:function(b,a){var c=b.weight||this.owner.defaultDockWeights[b.dock];return c[a]||c},getLayoutItems:function(){var e=this,b,g,d,c,a;if(e.owner.collapsed){a=e.owner.getCollapsedDockedItems()}else{b=e.getDockedItems("visual");g=b.length;a=[];for(c=0;c<g;c++){d=b[c];if(!d.hidden){a.push(d)}}}return a},measureContentWidth:function(a){var b=a.bodyContext;return b.el.getWidth()-b.getBorderInfo().width},measureContentHeight:function(a){var b=a.bodyContext;return b.el.getHeight()-b.getBorderInfo().height},redoLayout:function(c){var b=this,a=b.owner;if(c.isCollapsingOrExpanding==1){if(a.reExpander){a.reExpander.el.show()}a.addClsWithUI(a.collapsedCls);c.redo(true)}else{if(c.isCollapsingOrExpanding==2){a.removeClsWithUI(a.collapsedCls);c.bodyContext.redo()}}},renderChildren:function(){var b=this,a=b.getDockedItems(),c=b.getRenderTarget();b.handleItemBorders();b.renderItems(a,c)},renderItems:function(k,h){var l=this,c=k.length,a=0,b=0,p=0,m=l.getRenderTarget().dom.childNodes,n=m.length,g,d,e,o;for(g=0,d=0;g<n;g++){e=m[g];if(Ext.fly(e).hasCls(Ext.baseCSSPrefix+"resizable-handle")){break}for(d=0;d<c;d++){o=k[d];if(o.rendered&&o.el.dom===e){break}}if(d===c){p++}}for(;a<c;a++,b++){o=k[a];if(a===b&&(o.dock==="right"||o.dock==="bottom")){b+=p}if(o&&!o.rendered){l.renderItem(o,h,b)}else{if(!l.isValidParent(o,h,b)){l.moveItem(o,h,b)}}}},undoLayout:function(c){var b=this,a=b.owner;if(c.isCollapsingOrExpanding==1){if(a.reExpander){a.reExpander.el.hide()}a.removeClsWithUI(a.collapsedCls);c.undo(true)}else{if(c.isCollapsingOrExpanding==2){a.addClsWithUI(a.collapsedCls);c.bodyContext.undo()}}},sizePolicy:{nostretch:{setsWidth:0,setsHeight:0},horz:{shrinkWrap:{setsWidth:1,setsHeight:0,readsWidth:1},stretch:{setsWidth:1,setsHeight:0}},vert:{shrinkWrap:{setsWidth:0,setsHeight:1,readsHeight:1},stretch:{setsWidth:0,setsHeight:1}},stretchV:{setsWidth:0,setsHeight:1},autoStretchH:{readsWidth:1,setsWidth:1,setsHeight:0},autoStretchV:{readsHeight:1,setsWidth:0,setsHeight:1}},getItemSizePolicy:function(d,g){var c=this,h=c.sizePolicy,e=c.owner.shrinkWrapDock,b,a;if(d.stretch===false){return h.nostretch}b=d.dock;a=(b=="left"||b=="right");e=e===true?3:(e||0);if(a){h=h.vert;e=e&1}else{h=h.horz;e=e&2}if(e){if(!g){g=c.owner.getSizeModel()}if(g[a?"height":"width"].shrinkWrap){return h.shrinkWrap}}return h.stretch},configureItem:function(a,b){this.callParent(arguments);a.addCls(Ext.baseCSSPrefix+"docked");a.addClsWithUI(this.getDockCls(a.dock))},getDockCls:function(a){return"docked-"+a},afterRemove:function(a){this.callParent(arguments);if(this.itemCls){a.el.removeCls(this.itemCls+"-"+a.dock)}var b=a.el.dom;if(!a.destroying&&b){b.parentNode.removeChild(b)}this.childrenChanged=true},borderCollapseMap:{},getBorderCollapseTable:function(){var d=this,g=d.borderCollapseMap,a=d.owner,b=a.baseCls,e=a.ui,c;g=g[b]||(g[b]={});c=g[e];if(!c){b+="-"+e+"-outer-border-";g[e]=c=[0,b+"l",b+"b",b+"bl",b+"r",b+"rl",b+"rb",b+"rbl",b+"t",b+"tl",b+"tb",b+"tbl",b+"tr",b+"trl",b+"trb",b+"trbl"]}return c}});Ext.define("Ext.panel.AbstractPanel",{extend:Ext.container.Container,mixins:{docking:Ext.container.DockingContainer},baseCls:Ext.baseCSSPrefix+"panel",isPanel:true,contentPaddingProperty:"bodyPadding",shrinkWrapDock:false,componentLayout:"dock",childEls:["body"],renderTpl:["{% this.renderDockedItems(out,values,0); %}",(Ext.isIE7m||Ext.isIEQuirks)?'<div style="position:relative"></div>':"",'<div id="{id}-body" class="{baseCls}-body<tpl if="bodyCls"> {bodyCls}</tpl>',' {baseCls}-body-{ui}<tpl if="uiCls">','<tpl for="uiCls"> {parent.baseCls}-body-{parent.ui}-{.}</tpl>','</tpl>{childElCls}"','<tpl if="bodyStyle"> style="{bodyStyle}"</tpl>>',"{%this.renderContainer(out,values);%}","</div>","{% this.renderDockedItems(out,values,1); %}"],bodyPosProps:{x:"x",y:"y"},border:true,emptyArray:[],initComponent:function(){this.initBorderProps();this.callParent()},initBorderProps:function(){var a=this;if(a.frame&&a.border&&a.bodyBorder===undefined){a.bodyBorder=false}if(a.frame&&a.border&&(a.bodyBorder===false||a.bodyBorder===0)){a.manageBodyBorders=true}},beforeDestroy:function(){this.destroyDockedItems();this.callParent()},initItems:function(){this.callParent();this.initDockingItems()},initRenderData:function(){var a=this,b=a.callParent();a.initBodyStyles();a.protoBody.writeTo(b);delete a.protoBody;return b},getComponent:function(a){var b=this.callParent(arguments);if(b===undefined&&!Ext.isNumber(a)){b=this.getDockedComponent(a)}return b},getProtoBody:function(){var b=this,a=b.protoBody;if(!a){b.protoBody=a=new Ext.util.ProtoElement({cls:b.bodyCls,style:b.bodyStyle,clsProp:"bodyCls",styleProp:"bodyStyle",styleIsText:true})}return a},initBodyStyles:function(){var b=this,a=b.getProtoBody();if(b.bodyPadding!==undefined){if(b.layout.managePadding){a.setStyle("padding",0)}else{a.setStyle("padding",this.unitizeBox((b.bodyPadding===true)?5:b.bodyPadding))}}b.initBodyBorder()},initBodyBorder:function(){var a=this;if(a.frame&&a.bodyBorder){if(!Ext.isNumber(a.bodyBorder)){a.bodyBorder=1}a.getProtoBody().setStyle("border-width",this.unitizeBox(a.bodyBorder))}},getCollapsedDockedItems:function(){var a=this;return a.header===false||a.collapseMode=="placeholder"?a.emptyArray:[a.getReExpander()]},setBodyStyle:function(b,d){var c=this,a=c.rendered?c.body:c.getProtoBody();if(Ext.isFunction(b)){b=b()}if(arguments.length==1){if(Ext.isString(b)){b=Ext.Element.parseStyles(b)}a.setStyle(b)}else{a.setStyle(b,d)}return c},addBodyCls:function(b){var c=this,a=c.rendered?c.body:c.getProtoBody();a.addCls(b);return c},removeBodyCls:function(b){var c=this,a=c.rendered?c.body:c.getProtoBody();a.removeCls(b);return c},addUIClsToElement:function(b){var c=this,a=c.callParent(arguments);c.addBodyCls([Ext.baseCSSPrefix+b,c.baseCls+"-body-"+b,c.baseCls+"-body-"+c.ui+"-"+b]);return a},removeUIClsFromElement:function(b){var c=this,a=c.callParent(arguments);c.removeBodyCls([Ext.baseCSSPrefix+b,c.baseCls+"-body-"+b,c.baseCls+"-body-"+c.ui+"-"+b]);return a},addUIToElement:function(){var a=this;a.callParent(arguments);a.addBodyCls(a.baseCls+"-body-"+a.ui)},removeUIFromElement:function(){var a=this;a.callParent(arguments);a.removeBodyCls(a.baseCls+"-body-"+a.ui)},getTargetEl:function(){return this.body},applyTargetCls:function(a){this.getProtoBody().addCls(a)},getRefItems:function(a){var b=this.callParent(arguments);return this.getDockingRefItems(a,b)},setupRenderTpl:function(a){this.callParent(arguments);this.setupDockingRenderTpl(a)}});Ext.define("Ext.panel.Header",{extend:Ext.container.Container,alias:"widget.header",isHeader:true,defaultType:"tool",indicateDrag:false,weight:-1,componentLayout:"body",childEls:["body"],renderTpl:['<div id="{id}-body" class="{headerCls}-body {baseCls}-body {bodyCls} {bodyTargetCls}','<tpl for="uiCls"> {parent.baseCls}-body-{parent.ui}-{.}</tpl>"','<tpl if="bodyStyle"> style="{bodyStyle}"</tpl>>',"{%this.renderContainer(out,values)%}","</div>"],headingTpl:['<span id="{id}-textEl" class="{headerCls}-text {cls}-text" unselectable="on">{title}</span>'],shrinkWrap:3,titlePosition:0,headerCls:Ext.baseCSSPrefix+"header",initComponent:function(){var g=this,e=g.hasOwnProperty("titlePosition"),c=g.items,a=e?g.titlePosition:(c?c.length:0),b=[g.orientation,g.getDockName()],d=g.ownerCt;g.addEvents("click","dblclick");g.indicateDragCls=g.headerCls+"-draggable";g.title=g.title||"&#160;";g.tools=g.tools||[];c=g.items=(c?Ext.Array.slice(c):[]);g.orientation=g.orientation||"horizontal";g.dock=(g.dock)?g.dock:(g.orientation=="horizontal")?"top":"left";if(d?(!d.border&&!d.frame):!g.border){b.push(g.orientation+"-noborder")}g.addClsWithUI(b);g.addCls([g.headerCls,g.headerCls+"-"+g.orientation]);if(g.indicateDrag){g.addCls(g.indicateDragCls)}if(g.iconCls||g.icon||g.glyph){g.initIconCmp();if(!e&&!c.length){++a}c.push(g.iconCmp)}g.titleCmp=new Ext.Component({ariaRole:"heading",focusable:false,noWrap:true,flex:1,rtl:g.rtl,id:g.id+"_hd",style:g.titleAlign?("text-align:"+g.titleAlign):"",cls:g.headerCls+"-text-container "+g.baseCls+"-text-container "+g.baseCls+"-text-container-"+g.ui,renderTpl:g.getTpl("headingTpl"),renderData:{title:g.title,cls:g.baseCls,headerCls:g.headerCls,ui:g.ui},childEls:["textEl"],autoEl:{unselectable:"on"},listeners:{render:g.onTitleRender,scope:g}});g.layout=(g.orientation=="vertical")?{type:"vbox",align:"center",alignRoundingMethod:"ceil"}:{type:"hbox",align:"middle",alignRoundingMethod:"floor"};Ext.Array.push(c,g.tools);g.tools.length=0;g.callParent();if(c.length<a){a=c.length}g.titlePosition=a;g.insert(a,g.titleCmp);g.on({dblclick:g.onDblClick,click:g.onClick,element:"el",scope:g})},initIconCmp:function(){var c=this,b=[c.headerCls+"-icon",c.baseCls+"-icon",c.iconCls],a;if(c.glyph){b.push(c.baseCls+"-glyph")}a={focusable:false,src:Ext.BLANK_IMAGE_URL,cls:b,baseCls:c.baseCls+"-icon",id:c.id+"-iconEl",iconCls:c.iconCls,glyph:c.glyph};if(!Ext.isEmpty(c.icon)){delete a.iconCls;a.src=c.icon}c.iconCmp=new Ext.Img(a)},beforeRender:function(){this.protoEl.unselectable();this.callParent()},afterLayout:function(){var b=this,e,a,c,d;if(b.orientation==="vertical"){b.adjustTitlePosition();a=b.frameTR;if(a){e=b.frameBR;c=b.frameTL;d=(b.getWidth()-a.getPadding("r")-((c)?c.getPadding("l"):b.el.getBorderWidth("l")))+"px";e.setStyle("background-position-x",d);a.setStyle("background-position-x",d)}if(Ext.isIE7&&Ext.isStrict&&b.frame){b.el.repaint()}}},beforeLayout:function(){this.callParent();this.syncBeforeAfterTitleClasses()},adjustTitlePosition:function(){var b=this.titleCmp,a;if(!Ext.isIE9m&&b){a=b.el;a.setStyle("left",a.getWidth()+"px")}},onTitleRender:function(){if(this.orientation==="vertical"){this.titleCmp.el.setVertical(90)}},addUIClsToElement:function(b){var e=this,a=e.callParent(arguments),d=[e.baseCls+"-body-"+b,e.baseCls+"-body-"+e.ui+"-"+b],g,c;if(e.bodyCls){g=e.bodyCls.split(" ");for(c=0;c<d.length;c++){if(!Ext.Array.contains(g,d[c])){g.push(d[c])}}e.bodyCls=g.join(" ")}else{e.bodyCls=d.join(" ")}return a},removeUIClsFromElement:function(b){var e=this,a=e.callParent(arguments),d=[e.baseCls+"-body-"+b,e.baseCls+"-body-"+e.ui+"-"+b],g,c;if(e.bodyCls){g=e.bodyCls.split(" ");for(c=0;c<d.length;c++){Ext.Array.remove(g,d[c])}e.bodyCls=g.join(" ")}return a},addUIToElement:function(){var b=this,c,a;b.callParent(arguments);a=b.baseCls+"-body-"+b.ui;if(b.rendered){if(b.bodyCls){b.body.addCls(b.bodyCls)}else{b.body.addCls(a)}}else{if(b.bodyCls){c=b.bodyCls.split(" ");if(!Ext.Array.contains(c,a)){c.push(a)}b.bodyCls=c.join(" ")}else{b.bodyCls=a}}if(b.titleCmp&&b.titleCmp.rendered){b.titleCmp.addCls(b.baseCls+"-text-container-"+b.ui)}},removeUIFromElement:function(){var b=this,c,a;b.callParent(arguments);a=b.baseCls+"-body-"+b.ui;if(b.rendered){if(b.bodyCls){b.body.removeCls(b.bodyCls)}else{b.body.removeCls(a)}}else{if(b.bodyCls){c=b.bodyCls.split(" ");Ext.Array.remove(c,a);b.bodyCls=c.join(" ")}else{b.bodyCls=a}}if(b.titleCmp&&b.titleCmp.rendered){b.titleCmp.removeCls(b.baseCls+"-text-container-"+b.ui)}},onClick:function(a){this.fireClickEvent("click",a)},onDblClick:function(a){this.fireClickEvent("dblclick",a)},fireClickEvent:function(a,c){var b="."+Ext.panel.Tool.prototype.baseCls;if(!c.getTarget(b)){this.fireEvent(a,this,c)}},getFocusEl:function(){return this.el},getTargetEl:function(){return this.body||this.frameBody||this.el},applyTargetCls:function(a){this.bodyTargetCls=a},setTitle:function(c){var b=this,a=b.titleCmp;b.title=c;if(a.rendered){a.textEl.update(b.title||"&#160;");a.updateLayout()}else{b.titleCmp.on({render:function(){b.setTitle(c)},single:true})}},getMinWidth:function(){var e=this,d=e.titleCmp.textEl.dom,a,g=e.tools,b,c;d.style.display="inline";a=d.offsetWidth;d.style.display="";if(g&&(b=g.length)){for(c=0;c<b;c++){if(g[c].el){a+=g[c].el.dom.offsetWidth}}}if(e.iconCmp){a+=e.iconCmp.el.dom.offsetWidth}return a+10},setIconCls:function(a){var b=this,d=!a||!a.length,c=b.iconCmp;b.iconCls=a;if(!b.iconCmp&&!d){b.initIconCmp();b.insert(0,b.iconCmp)}else{if(c){if(d){b.iconCmp.destroy();delete b.iconCmp}else{c.removeCls(c.iconCls);c.addCls(a);c.iconCls=a}}}},setIcon:function(a){var b=this,d=!a||!a.length,c=b.iconCmp;b.icon=a;if(!b.iconCmp&&!d){b.initIconCmp();b.insert(0,b.iconCmp)}else{if(c){if(d){b.iconCmp.destroy();delete b.iconCmp}else{c.setSrc(b.icon)}}}},setGlyph:function(b){var a=this,c=a.iconCmp;if(!a.iconCmp){a.initIconCmp();a.insert(0,a.iconCmp)}else{if(c){if(b){a.iconCmp.setGlyph(b)}else{a.iconCmp.destroy();delete a.iconCmp}}}},getTools:function(){return this.tools.slice()},addTool:function(a){this.add(Ext.ComponentManager.create(a,"tool"))},syncBeforeAfterTitleClasses:function(){var j=this,h=j.items,e=h.items,b=j.titlePosition,a=e.length,g=h.generation,k=j.syncBeforeAfterGen,m,d,c,l;if(k===g){return}j.syncBeforeAfterGen=g;for(c=0;c<a;++c){l=e[c];m=l.afterTitleCls||(l.afterTitleCls=l.baseCls+"-after-title");d=l.beforeTitleCls||(l.beforeTitleCls=l.baseCls+"-before-title");if(!j.title||c<b){if(k){l.removeCls(m)}l.addCls(d)}else{if(c>b){if(k){l.removeCls(d)}l.addCls(m)}}}},onAdd:function(b,a){var c=this.tools;this.callParent(arguments);if(b.isTool){c.push(b);c[b.type]=b}},initRenderData:function(){return Ext.applyIf(this.callParent(),{bodyCls:this.bodyCls,bodyTargetCls:this.bodyTargetCls,headerCls:this.headerCls})},getDockName:function(){return this.dock}});Ext.define("Ext.dd.DragDrop",{constructor:function(c,a,b){if(c){this.init(c,a,b)}},id:null,config:null,dragElId:null,handleElId:null,invalidHandleTypes:null,invalidHandleIds:null,invalidHandleClasses:null,startPageX:0,startPageY:0,groups:null,locked:false,lock:function(){this.locked=true},moveOnly:false,unlock:function(){this.locked=false},isTarget:true,padding:null,_domRef:null,__ygDragDrop:true,constrainX:false,constrainY:false,minX:0,maxX:0,minY:0,maxY:0,maintainOffset:false,xTicks:null,yTicks:null,primaryButtonOnly:true,available:false,hasOuterHandles:false,b4StartDrag:function(a,b){},startDrag:function(a,b){},b4Drag:function(a){},onDrag:function(a){},onDragEnter:function(a,b){},b4DragOver:function(a){},onDragOver:function(a,b){},b4DragOut:function(a){},onDragOut:function(a,b){},b4DragDrop:function(a){},onDragDrop:function(a,b){},onInvalidDrop:function(a){},b4EndDrag:function(a){},endDrag:function(a){},b4MouseDown:function(a){},onMouseDown:function(a){},onMouseUp:function(a){},onAvailable:function(){},defaultPadding:{left:0,right:0,top:0,bottom:0},constrainTo:function(i,g,n){if(Ext.isNumber(g)){g={left:g,right:g,top:g,bottom:g}}g=g||this.defaultPadding;var k=Ext.get(this.getEl()).getBox(),a=Ext.get(i),m=a.getScroll(),j,d=a.dom,l,h,e;if(d==document.body){j={x:m.left,y:m.top,width:Ext.Element.getViewWidth(),height:Ext.Element.getViewHeight()}}else{l=a.getXY();j={x:l[0],y:l[1],width:d.clientWidth,height:d.clientHeight}}h=k.y-j.y;e=k.x-j.x;this.resetConstraints();this.setXConstraint(e-(g.left||0),j.width-e-k.width-(g.right||0),this.xTickSize);this.setYConstraint(h-(g.top||0),j.height-h-k.height-(g.bottom||0),this.yTickSize)},getEl:function(){if(!this._domRef){this._domRef=Ext.getDom(this.id)}return this._domRef},getDragEl:function(){return Ext.getDom(this.dragElId)},init:function(c,a,b){this.initTarget(c,a,b);Ext.EventManager.on(this.id,"mousedown",this.handleMouseDown,this)},initTarget:function(c,a,b){this.config=b||{};this.DDMInstance=Ext.dd.DragDropManager;this.groups={};if(typeof c!=="string"){c=Ext.id(c)}this.id=c;this.addToGroup((a)?a:"default");this.handleElId=c;this.setDragElId(c);this.invalidHandleTypes={A:"A"};this.invalidHandleIds={};this.invalidHandleClasses=[];this.applyConfig();this.handleOnAvailable()},applyConfig:function(){this.padding=this.config.padding||[0,0,0,0];this.isTarget=(this.config.isTarget!==false);this.maintainOffset=(this.config.maintainOffset);this.primaryButtonOnly=(this.config.primaryButtonOnly!==false)},handleOnAvailable:function(){this.available=true;this.resetConstraints();this.onAvailable()},setPadding:function(c,a,d,b){if(!a&&0!==a){this.padding=[c,c,c,c]}else{if(!d&&0!==d){this.padding=[c,a,c,a]}else{this.padding=[c,a,d,b]}}},setInitPosition:function(d,c){var e=this.getEl(),b,a,g;if(!this.DDMInstance.verifyEl(e)){return}b=d||0;a=c||0;g=Ext.Element.getXY(e);this.initPageX=g[0]-b;this.initPageY=g[1]-a;this.lastPageX=g[0];this.lastPageY=g[1];this.setStartPosition(g)},setStartPosition:function(b){var a=b||Ext.Element.getXY(this.getEl());this.deltaSetXY=null;this.startPageX=a[0];this.startPageY=a[1]},addToGroup:function(a){this.groups[a]=true;this.DDMInstance.regDragDrop(this,a)},removeFromGroup:function(a){if(this.groups[a]){delete this.groups[a]}this.DDMInstance.removeDDFromGroup(this,a)},setDragElId:function(a){this.dragElId=a},setHandleElId:function(a){if(typeof a!=="string"){a=Ext.id(a)}this.handleElId=a;this.DDMInstance.regHandle(this.id,a)},setOuterHandleElId:function(a){if(typeof a!=="string"){a=Ext.id(a)}Ext.EventManager.on(a,"mousedown",this.handleMouseDown,this);this.setHandleElId(a);this.hasOuterHandles=true},unreg:function(){Ext.EventManager.un(this.id,"mousedown",this.handleMouseDown,this);this._domRef=null;this.DDMInstance._remove(this)},destroy:function(){this.unreg()},isLocked:function(){return(this.DDMInstance.isLocked()||this.locked)},handleMouseDown:function(c,b){var a=this,d;if((a.primaryButtonOnly&&c.button!=0)||a.isLocked()){return}a.DDMInstance.refreshCache(a.groups);if(a.hasOuterHandles||a.DDMInstance.isOverTarget(c.getPoint(),a)){if(a.clickValidator(c)){d=Ext.Element.getActiveElement();a.setStartPosition();a.b4MouseDown(c);a.onMouseDown(c);a.DDMInstance.handleMouseDown(c,a);if(d){Ext.fly(d).blur()}a.DDMInstance.stopEvent(c)}}},clickValidator:function(b){var a=b.getTarget();return(this.isValidHandleChild(a)&&(this.id==this.handleElId||this.DDMInstance.handleWasClicked(a,this.id)))},addInvalidHandleType:function(a){var b=a.toUpperCase();this.invalidHandleTypes[b]=b},addInvalidHandleId:function(a){if(typeof a!=="string"){a=Ext.id(a)}this.invalidHandleIds[a]=a},addInvalidHandleClass:function(a){this.invalidHandleClasses.push(a)},removeInvalidHandleType:function(a){var b=a.toUpperCase();delete this.invalidHandleTypes[b]},removeInvalidHandleId:function(a){if(typeof a!=="string"){a=Ext.id(a)}delete this.invalidHandleIds[a]},removeInvalidHandleClass:function(b){for(var c=0,a=this.invalidHandleClasses.length;c<a;++c){if(this.invalidHandleClasses[c]==b){delete this.invalidHandleClasses[c]}}},isValidHandleChild:function(d){var c=true,h,b,a;try{h=d.nodeName.toUpperCase()}catch(g){h=d.nodeName}c=c&&!this.invalidHandleTypes[h];c=c&&!this.invalidHandleIds[d.id];for(b=0,a=this.invalidHandleClasses.length;c&&b<a;++b){c=!Ext.fly(d).hasCls(this.invalidHandleClasses[b])}return c},setXTicks:function(d,a){this.xTicks=[];this.xTickSize=a;var c={},b;for(b=this.initPageX;b>=this.minX;b=b-a){if(!c[b]){this.xTicks[this.xTicks.length]=b;c[b]=true}}for(b=this.initPageX;b<=this.maxX;b=b+a){if(!c[b]){this.xTicks[this.xTicks.length]=b;c[b]=true}}Ext.Array.sort(this.xTicks,this.DDMInstance.numericSort)},setYTicks:function(d,a){this.yTicks=[];this.yTickSize=a;var c={},b;for(b=this.initPageY;b>=this.minY;b=b-a){if(!c[b]){this.yTicks[this.yTicks.length]=b;c[b]=true}}for(b=this.initPageY;b<=this.maxY;b=b+a){if(!c[b]){this.yTicks[this.yTicks.length]=b;c[b]=true}}Ext.Array.sort(this.yTicks,this.DDMInstance.numericSort)},setXConstraint:function(c,b,a){this.leftConstraint=c;this.rightConstraint=b;this.minX=this.initPageX-c;this.maxX=this.initPageX+b;if(a){this.setXTicks(this.initPageX,a)}this.constrainX=true},clearConstraints:function(){this.constrainX=false;this.constrainY=false;this.clearTicks()},clearTicks:function(){this.xTicks=null;this.yTicks=null;this.xTickSize=0;this.yTickSize=0},setYConstraint:function(a,c,b){this.topConstraint=a;this.bottomConstraint=c;this.minY=this.initPageY-a;this.maxY=this.initPageY+c;if(b){this.setYTicks(this.initPageY,b)}this.constrainY=true},resetConstraints:function(){if(this.initPageX||this.initPageX===0){var b=(this.maintainOffset)?this.lastPageX-this.initPageX:0,a=(this.maintainOffset)?this.lastPageY-this.initPageY:0;this.setInitPosition(b,a)}else{this.setInitPosition()}if(this.constrainX){this.setXConstraint(this.leftConstraint,this.rightConstraint,this.xTickSize)}if(this.constrainY){this.setYConstraint(this.topConstraint,this.bottomConstraint,this.yTickSize)}},getTick:function(h,d){if(!d){return h}else{if(d[0]>=h){return d[0]}else{var b,a,c,g,e;for(b=0,a=d.length;b<a;++b){c=b+1;if(d[c]&&d[c]>=h){g=h-d[b];e=d[c]-h;return(e>g)?d[b]:d[c]}}return d[d.length-1]}}},toString:function(){return("DragDrop "+this.id)}});Ext.define("Ext.dd.DD",{extend:Ext.dd.DragDrop,constructor:function(c,a,b){if(c){this.init(c,a,b)}},scroll:true,autoOffset:function(c,b){var a=c-this.startPageX,d=b-this.startPageY;this.setDelta(a,d)},setDelta:function(b,a){this.deltaX=b;this.deltaY=a},setDragElPos:function(c,b){var a=this.getDragEl();this.alignElWithMouse(a,c,b)},alignElWithMouse:function(b,e,c){var g=this.getTargetCoord(e,c),d=b.dom?b:Ext.fly(b,"_dd"),l=d.getSize(),i=Ext.Element,j,a,k,h;if(!this.deltaSetXY){j=this.cachedViewportSize={width:i.getDocumentWidth(),height:i.getDocumentHeight()};a=[Math.max(0,Math.min(g.x,j.width-l.width)),Math.max(0,Math.min(g.y,j.height-l.height))];d.setXY(a);k=this.getLocalX(d);h=d.getLocalY();this.deltaSetXY=[k-g.x,h-g.y]}else{j=this.cachedViewportSize;this.setLocalXY(d,Math.max(0,Math.min(g.x+this.deltaSetXY[0],j.width-l.width)),Math.max(0,Math.min(g.y+this.deltaSetXY[1],j.height-l.height)))}this.cachePosition(g.x,g.y);this.autoScroll(g.x,g.y,b.offsetHeight,b.offsetWidth);return g},cachePosition:function(b,a){if(b){this.lastPageX=b;this.lastPageY=a}else{var c=Ext.Element.getXY(this.getEl());this.lastPageX=c[0];this.lastPageY=c[1]}},autoScroll:function(l,k,e,m){if(this.scroll){var n=Ext.Element.getViewHeight(),b=Ext.Element.getViewWidth(),p=this.DDMInstance.getScrollTop(),d=this.DDMInstance.getScrollLeft(),j=e+k,o=m+l,i=(n+p-k-this.deltaY),g=(b+d-l-this.deltaX),c=40,a=(document.all)?80:30;if(j>n&&i<c){window.scrollTo(d,p+a)}if(k<p&&p>0&&k-p<c){window.scrollTo(d,p-a)}if(o>b&&g<c){window.scrollTo(d+a,p)}if(l<d&&d>0&&l-d<c){window.scrollTo(d-a,p)}}},getTargetCoord:function(c,b){var a=c-this.deltaX,d=b-this.deltaY;if(this.constrainX){if(a<this.minX){a=this.minX}if(a>this.maxX){a=this.maxX}}if(this.constrainY){if(d<this.minY){d=this.minY}if(d>this.maxY){d=this.maxY}}a=this.getTick(a,this.xTicks);d=this.getTick(d,this.yTicks);return{x:a,y:d}},applyConfig:function(){this.callParent();this.scroll=(this.config.scroll!==false)},b4MouseDown:function(a){this.autoOffset(a.getPageX(),a.getPageY())},b4Drag:function(a){this.setDragElPos(a.getPageX(),a.getPageY())},toString:function(){return("DD "+this.id)},getLocalX:function(a){return a.getLocalX()},setLocalXY:function(b,a,c){b.setLocalXY(a,c)}});Ext.define("Ext.dd.DDProxy",{extend:Ext.dd.DD,statics:{dragElId:"ygddfdiv"},constructor:function(c,a,b){if(c){this.init(c,a,b);this.initFrame()}},resizeFrame:true,centerFrame:false,createFrame:function(){var b=this,a=document.body,d,c;if(!a||!a.firstChild){setTimeout(function(){b.createFrame()},50);return}d=this.getDragEl();if(!d){d=document.createElement("div");d.id=this.dragElId;c=d.style;c.position="absolute";c.visibility="hidden";c.cursor="move";c.border="2px solid #aaa";c.zIndex=999;a.insertBefore(d,a.firstChild)}},initFrame:function(){this.createFrame()},applyConfig:function(){this.callParent();this.resizeFrame=(this.config.resizeFrame!==false);this.centerFrame=(this.config.centerFrame);this.setDragElId(this.config.dragElId||Ext.dd.DDProxy.dragElId)},showFrame:function(e,d){var c=this.getEl(),a=this.getDragEl(),b=a.style;this._resizeProxy();if(this.centerFrame){this.setDelta(Math.round(parseInt(b.width,10)/2),Math.round(parseInt(b.height,10)/2))}this.setDragElPos(e,d);Ext.fly(a).show()},_resizeProxy:function(){if(this.resizeFrame){var a=this.getEl();Ext.fly(this.getDragEl()).setSize(a.offsetWidth,a.offsetHeight)}},b4MouseDown:function(b){var a=b.getPageX(),c=b.getPageY();this.autoOffset(a,c);this.setDragElPos(a,c)},b4StartDrag:function(a,b){this.showFrame(a,b)},b4EndDrag:function(a){Ext.fly(this.getDragEl()).hide()},endDrag:function(c){var b=this.getEl(),a=this.getDragEl();a.style.visibility="";this.beforeMove();b.style.visibility="hidden";Ext.dd.DDM.moveToEl(b,a);a.style.visibility="hidden";b.style.visibility="";this.afterDrag()},beforeMove:function(){},afterDrag:function(){},toString:function(){return("DDProxy "+this.id)}});Ext.define("Ext.dd.StatusProxy",{extend:Ext.Component,animRepair:false,childEls:["ghost"],renderTpl:['<div class="'+Ext.baseCSSPrefix+'dd-drop-icon"></div><div id="{id}-ghost" class="'+Ext.baseCSSPrefix+'dd-drag-ghost"></div>'],repairCls:Ext.baseCSSPrefix+"dd-drag-repair",constructor:function(a){var b=this;a=a||{};Ext.apply(b,{hideMode:"visibility",hidden:true,floating:true,id:b.id||Ext.id(),cls:Ext.baseCSSPrefix+"dd-drag-proxy "+this.dropNotAllowed,shadow:a.shadow||false,renderTo:Ext.getDetachedBody()});b.callParent(arguments);this.dropStatus=this.dropNotAllowed},dropAllowed:Ext.baseCSSPrefix+"dd-drop-ok",dropNotAllowed:Ext.baseCSSPrefix+"dd-drop-nodrop",setStatus:function(a){a=a||this.dropNotAllowed;if(this.dropStatus!=a){this.el.replaceCls(this.dropStatus,a);this.dropStatus=a}},reset:function(b){var c=this,a=Ext.baseCSSPrefix+"dd-drag-proxy ";c.el.replaceCls(a+c.dropAllowed,a+c.dropNotAllowed);c.dropStatus=c.dropNotAllowed;if(b){c.ghost.update("")}},update:function(a){if(typeof a=="string"){this.ghost.update(a)}else{this.ghost.update("");a.style.margin="0";this.ghost.dom.appendChild(a)}var b=this.ghost.dom.firstChild;if(b){Ext.fly(b).setStyle("float","none")}},getGhost:function(){return this.ghost},hide:function(a){this.callParent();if(a){this.reset(true)}},stop:function(){if(this.anim&&this.anim.isAnimated&&this.anim.isAnimated()){this.anim.stop()}},sync:function(){this.el.sync()},repair:function(c,d,a){var b=this;b.callback=d;b.scope=a;if(c&&b.animRepair!==false){b.el.addCls(b.repairCls);b.el.hideUnders(true);b.anim=b.el.animate({duration:b.repairDuration||500,easing:"ease-out",to:{x:c[0],y:c[1]},stopAnimation:true,callback:b.afterRepair,scope:b})}else{b.afterRepair()}},afterRepair:function(){var a=this;a.hide(true);a.el.removeCls(a.repairCls);if(typeof a.callback=="function"){a.callback.call(a.scope||a)}delete a.callback;delete a.scope}});Ext.define("Ext.dd.DragSource",{extend:Ext.dd.DDProxy,dropAllowed:Ext.baseCSSPrefix+"dd-drop-ok",dropNotAllowed:Ext.baseCSSPrefix+"dd-drop-nodrop",animRepair:true,repairHighlightColor:"c3daf9",constructor:function(b,a){this.el=Ext.get(b);if(!this.dragData){this.dragData={}}Ext.apply(this,a);if(!this.proxy){this.proxy=new Ext.dd.StatusProxy({id:this.el.id+"-drag-status-proxy",animRepair:this.animRepair})}this.callParent([this.el.dom,this.ddGroup||this.group,{dragElId:this.proxy.id,resizeFrame:false,isTarget:false,scroll:this.scroll===true}]);this.dragging=false},getDragData:function(a){return this.dragData},onDragEnter:function(c,d){var b=Ext.dd.DragDropManager.getDDById(d),a;this.cachedTarget=b;if(this.beforeDragEnter(b,c,d)!==false){if(b.isNotifyTarget){a=b.notifyEnter(this,c,this.dragData);this.proxy.setStatus(a)}else{this.proxy.setStatus(this.dropAllowed)}if(this.afterDragEnter){this.afterDragEnter(b,c,d)}}},beforeDragEnter:function(b,a,c){return true},onDragOver:function(c,d){var b=this.cachedTarget||Ext.dd.DragDropManager.getDDById(d),a;if(this.beforeDragOver(b,c,d)!==false){if(b.isNotifyTarget){a=b.notifyOver(this,c,this.dragData);this.proxy.setStatus(a)}if(this.afterDragOver){this.afterDragOver(b,c,d)}}},beforeDragOver:function(b,a,c){return true},onDragOut:function(b,c){var a=this.cachedTarget||Ext.dd.DragDropManager.getDDById(c);if(this.beforeDragOut(a,b,c)!==false){if(a.isNotifyTarget){a.notifyOut(this,b,this.dragData)}this.proxy.reset();if(this.afterDragOut){this.afterDragOut(a,b,c)}}this.cachedTarget=null},beforeDragOut:function(b,a,c){return true},onDragDrop:function(b,c){var a=this.cachedTarget||Ext.dd.DragDropManager.getDDById(c);if(this.beforeDragDrop(a,b,c)!==false){if(a.isNotifyTarget){if(a.notifyDrop(this,b,this.dragData)!==false){this.onValidDrop(a,b,c)}else{this.onInvalidDrop(a,b,c)}}else{this.onValidDrop(a,b,c)}if(this.afterDragDrop){this.afterDragDrop(a,b,c)}}delete this.cachedTarget},beforeDragDrop:function(b,a,c){return true},onValidDrop:function(b,a,c){this.hideProxy();if(this.afterValidDrop){this.afterValidDrop(b,a,c)}},getRepairXY:function(b,a){return this.el.getXY()},onInvalidDrop:function(b,a,c){if(!a){a=b;b=null;c=a.getTarget().id}this.beforeInvalidDrop(b,a,c);if(this.cachedTarget){if(this.cachedTarget.isNotifyTarget){this.cachedTarget.notifyOut(this,a,this.dragData)}this.cacheTarget=null}this.proxy.repair(this.getRepairXY(a,this.dragData),this.afterRepair,this);if(this.afterInvalidDrop){this.afterInvalidDrop(a,c)}},afterRepair:function(){var a=this;if(Ext.enableFx){a.el.highlight(a.repairHighlightColor)}a.dragging=false},beforeInvalidDrop:function(b,a,c){return true},handleMouseDown:function(b){if(this.dragging){return}var a=this.getDragData(b);if(a&&this.onBeforeDrag(a,b)!==false){this.dragData=a;this.proxy.stop();this.callParent(arguments)}},onBeforeDrag:function(a,b){return true},onStartDrag:Ext.emptyFn,alignElWithMouse:function(){this.proxy.ensureAttachedToBody(true);return this.callParent(arguments)},startDrag:function(a,b){this.proxy.reset();this.proxy.hidden=false;this.dragging=true;this.proxy.update("");this.onInitDrag(a,b);this.proxy.show()},onInitDrag:function(a,c){var b=this.el.dom.cloneNode(true);b.id=Ext.id();this.proxy.update(b);this.onStartDrag(a,c);return true},getProxy:function(){return this.proxy},hideProxy:function(){this.proxy.hide();this.proxy.reset(true);this.dragging=false},triggerCacheRefresh:function(){Ext.dd.DDM.refreshCache(this.groups)},b4EndDrag:function(a){},endDrag:function(a){this.onEndDrag(this.dragData,a)},onEndDrag:function(a,b){},autoOffset:function(a,b){this.setDelta(-12,-20)},destroy:function(){this.callParent();Ext.destroy(this.proxy)}});Ext.define("Ext.panel.Proxy",{alternateClassName:"Ext.dd.PanelProxy",moveOnDrag:true,constructor:function(a,b){var c=this;c.panel=a;c.id=c.panel.id+"-ddproxy";Ext.apply(c,b)},insertProxy:true,setStatus:Ext.emptyFn,reset:Ext.emptyFn,update:Ext.emptyFn,stop:Ext.emptyFn,sync:Ext.emptyFn,getEl:function(){return this.ghost.el},getGhost:function(){return this.ghost},getProxy:function(){return this.proxy},hide:function(){var a=this;if(a.ghost){if(a.proxy){a.proxy.remove();delete a.proxy}a.panel.unghost(null,a.moveOnDrag);delete a.ghost}},show:function(){var b=this,a;if(!b.ghost){a=b.panel.getSize();b.panel.el.setVisibilityMode(Ext.Element.DISPLAY);b.ghost=b.panel.ghost();if(b.insertProxy){b.proxy=b.panel.el.insertSibling({cls:Ext.baseCSSPrefix+"panel-dd-spacer"});b.proxy.setSize(a)}}},repair:function(b,c,a){this.hide();Ext.callback(c,a||this)},moveProxy:function(a,b){if(this.proxy){a.insertBefore(this.proxy.dom,b)}}});Ext.define("Ext.panel.DD",{extend:Ext.dd.DragSource,constructor:function(b,a){var c=this;c.panel=b;c.dragData={panel:b};c.panelProxy=new Ext.panel.Proxy(b,a);c.proxy=c.panelProxy.proxy;c.callParent([b.el,a]);c.setupEl(b)},setupEl:function(a){var c=this,d=a.header,b=a.body;if(d){c.setHandleElId(d.id);b=d.el}if(b){b.setStyle("cursor","move");c.scroll=false}else{a.on("boxready",c.setupEl,c,{single:true})}},showFrame:Ext.emptyFn,startDrag:Ext.emptyFn,b4StartDrag:function(a,b){this.panelProxy.show()},b4MouseDown:function(b){var a=b.getPageX(),c=b.getPageY();this.autoOffset(a,c)},onInitDrag:function(a,b){this.onStartDrag(a,b);return true},createFrame:Ext.emptyFn,getDragEl:function(b){var a=this.panelProxy.ghost;if(a){return a.el.dom}},endDrag:function(a){this.panelProxy.hide();this.panel.saveState()},autoOffset:function(a,b){a-=this.startPageX;b-=this.startPageY;this.setDelta(a,b)},onInvalidDrop:function(c,b,d){var a=this;a.beforeInvalidDrop(c,b,d);if(a.cachedTarget){if(a.cachedTarget.isNotifyTarget){a.cachedTarget.notifyOut(a,b,a.dragData)}a.cacheTarget=null}if(a.afterInvalidDrop){a.afterInvalidDrop(b,d)}}});Ext.define("Ext.util.Memento",(function(){function d(i,h,j,g){i[g?g+j:j]=h[j]}function c(h,g,i){delete h[i]}function e(k,j,l,i){var g=i?i+l:l,h=k[g];if(h||k.hasOwnProperty(g)){a(j,l,h)}}function a(h,i,g){if(Ext.isDefined(g)){h[i]=g}else{delete h[i]}}function b(h,m,l,i,j){if(m){if(Ext.isArray(i)){var k,g=i.length;for(k=0;k<g;k++){h(m,l,i[k],j)}}else{h(m,l,i,j)}}}return{data:null,target:null,constructor:function(h,g){if(h){this.target=h;if(g){this.capture(g)}}},capture:function(g,j,i){var h=this;b(d,h.data||(h.data={}),j||h.target,g,i)},remove:function(g){b(c,this.data,null,g)},restore:function(h,g,j,i){b(e,this.data,j||this.target,h,i);if(g!==false){this.remove(h)}},restoreAll:function(g,k){var i=this,h=k||this.target,j=i.data,l;for(l in j){if(j.hasOwnProperty(l)){a(h,l,j[l])}}if(g!==false){delete i.data}}}}()));Ext.define("Ext.panel.Panel",{extend:Ext.panel.AbstractPanel,alias:"widget.panel",alternateClassName:"Ext.Panel",collapsedCls:"collapsed",animCollapse:Ext.enableFx,minButtonWidth:75,collapsed:false,collapseFirst:true,hideCollapseTool:false,titleCollapse:undefined,floatable:true,collapsible:undefined,closable:false,closeAction:"destroy",placeholderCollapseHideMode:Ext.Element.VISIBILITY,preventHeader:false,header:undefined,headerPosition:"top",frame:false,frameHeader:true,manageHeight:true,constrain:false,constrainHeader:false,initComponent:function(){var a=this;a.addEvents("beforeclose","close","beforeexpand","beforecollapse","expand","collapse","titlechange","iconchange","iconclschange","glyphchange","float","unfloat");if(a.collapsible){this.addStateEvents(["expand","collapse"])}if(a.unstyled){a.setUI("plain")}if(a.frame){a.setUI(a.ui+"-framed")}a.bridgeToolbars();a.callParent();a.collapseDirection=a.collapseDirection||a.headerPosition||Ext.Component.DIRECTION_TOP;a.hiddenOnCollapse=new Ext.dom.CompositeElement()},beforeDestroy:function(){var a=this;Ext.destroy(a.placeholder,a.ghostPanel,a.dd);a.callParent()},initAria:function(){this.callParent();this.initHeaderAria()},getFocusEl:function(){return this.el},initHeaderAria:function(){var b=this,a=b.el,c=b.header;if(a&&c){a.dom.setAttribute("aria-labelledby",c.titleCmp.id)}},getHeader:function(){return this.header},setTitle:function(g){var c=this,b=c.title,e=c.header,a=c.reExpander,d=c.placeholder;c.title=g;if(e){if(e.isHeader){e.setTitle(g)}else{e.title=g}}else{c.updateHeader()}if(a){a.setTitle(g)}if(d&&d.setTitle){d.setTitle(g)}c.fireEvent("titlechange",c,g,b)},setIconCls:function(a){var c=this,b=c.iconCls,e=c.header,d=c.placeholder;c.iconCls=a;if(e){if(e.isHeader){e.setIconCls(a)}else{e.iconCls=a}}else{c.updateHeader()}if(d&&d.setIconCls){d.setIconCls(a)}c.fireEvent("iconclschange",c,a,b)},setIcon:function(a){var b=this,c=b.icon,e=b.header,d=b.placeholder;b.icon=a;if(e){if(e.isHeader){e.setIcon(a)}else{e.icon=a}}else{b.updateHeader()}if(d&&d.setIcon){d.setIcon(a)}b.fireEvent("iconchange",b,a,c)},setGlyph:function(c){var b=this,a=b.glyph,e=b.header,d=b.placeholder;b.glyph=c;if(e){if(e.isHeader){e.setGlyph(c)}else{e.glyph=c}}else{b.updateHeader()}if(d&&d.setGlyph){d.setIcon(c)}b.fireEvent("glyphchange",b,c,a)},bridgeToolbars:function(){var a=this,g=[],c,b,e=a.minButtonWidth;function d(h,j,i){if(Ext.isArray(h)){h={xtype:"toolbar",items:h}}else{if(!h.xtype){h.xtype="toolbar"}}h.dock=j;if(j=="left"||j=="right"){h.vertical=true}if(i){h.layout=Ext.applyIf(h.layout||{},{pack:{left:"start",center:"center"}[a.buttonAlign]||"end"})}return h}if(a.tbar){g.push(d(a.tbar,"top"));a.tbar=null}if(a.bbar){g.push(d(a.bbar,"bottom"));a.bbar=null}if(a.buttons){a.fbar=a.buttons;a.buttons=null}if(a.fbar){c=d(a.fbar,"bottom",true);c.ui="footer";if(e){b=c.defaults;c.defaults=function(h){var i=b||{};if((!h.xtype||h.xtype==="button"||(h.isComponent&&h.isXType("button")))&&!("minWidth" in i)){i=Ext.apply({minWidth:e},i)}return i}}g.push(c);a.fbar=null}if(a.lbar){g.push(d(a.lbar,"left"));a.lbar=null}if(a.rbar){g.push(d(a.rbar,"right"));a.rbar=null}if(a.dockedItems){if(!Ext.isArray(a.dockedItems)){a.dockedItems=[a.dockedItems]}a.dockedItems=a.dockedItems.concat(g)}else{a.dockedItems=g}},isPlaceHolderCollapse:function(){return this.collapseMode=="placeholder"},onBoxReady:function(){this.callParent();if(this.collapsed){this.setHiddenDocked()}},beforeRender:function(){var b=this,a;b.callParent();b.initTools();if(!(b.preventHeader||(b.header===false))){b.updateHeader()}if(b.collapsed){if(b.isPlaceHolderCollapse()){if(!b.hidden){b.hidden=true;b.preventCollapseFire=true;b.placeholderCollapse();delete b.preventCollapseFire;a=b.collapsed;b.collapsed=false}}else{b.beginCollapse();b.addClsWithUI(b.collapsedCls)}}if(a){b.collapsed=a}},initTools:function(){var a=this;a.tools=a.tools?Ext.Array.clone(a.tools):[];if(a.collapsible&&!(a.hideCollapseTool||a.header===false||a.preventHeader)){a.collapseDirection=a.collapseDirection||a.headerPosition||"top";a.collapseTool=a.expandTool=Ext.widget({xtype:"tool",type:(a.collapsed&&!a.isPlaceHolderCollapse())?("expand-"+a.getOppositeDirection(a.collapseDirection)):("collapse-"+a.collapseDirection),handler:a.toggleCollapse,scope:a});if(a.collapseFirst){a.tools.unshift(a.collapseTool)}}a.addTools();if(a.closable){a.addClsWithUI("closable");a.addTool(Ext.widget({xtype:"tool",type:"close",handler:Ext.Function.bind(a.close,a,[])}))}if(a.collapseTool&&!a.collapseFirst){a.addTool(a.collapseTool)}},addTools:Ext.emptyFn,close:function(){if(this.fireEvent("beforeclose",this)!==false){this.doClose()}},doClose:function(){this.fireEvent("close",this);this[this.closeAction]()},updateHeader:function(d){var c=this,h=c.header,g=c.title,e=c.tools,b=c.icon||c.iconCls,a=c.headerPosition=="left"||c.headerPosition=="right";if(Ext.isObject(h)||(h!==false&&(d||(g||b)||(e&&e.length)||(c.collapsible&&!c.titleCollapse)))){if(h&&h.isHeader){h.show()}else{h=c.header=Ext.widget(Ext.apply({xtype:"header",title:g,titleAlign:c.titleAlign,orientation:a?"vertical":"horizontal",dock:c.headerPosition||"top",textCls:c.headerTextCls,iconCls:c.iconCls,icon:c.icon,glyph:c.glyph,baseCls:c.baseCls+"-header",tools:e,ui:c.ui,id:c.id+"_header",overCls:c.headerOverCls,indicateDrag:c.draggable,frame:(c.frame||c.alwaysFramed)&&c.frameHeader,ignoreParentFrame:c.frame||c.overlapHeader,ignoreBorderManagement:c.frame||c.ignoreHeaderBorderManagement,ownerCt:c,listeners:c.collapsible&&c.titleCollapse?{click:c.toggleCollapse,scope:c}:null},c.header));c.addDocked(h,0)}c.initHeaderAria()}else{if(h){h.hide()}}},setUI:function(b){var a=this;a.callParent(arguments);if(a.header&&a.header.rendered){a.header.setUI(b)}},getDefaultContentTarget:function(){return this.body},getTargetEl:function(){var a=this;return a.body||a.protoBody||a.frameBody||a.el},isVisible:function(a){var b=this;if(b.collapsed&&b.placeholder){return b.placeholder.isVisible(a)}return b.callParent(arguments)},onHide:function(){var a=this;if(a.collapsed&&a.placeholder){a.placeholder.hide()}else{a.callParent(arguments)}},onShow:function(){var a=this;if(a.collapsed&&a.isPlaceHolderCollapse()){a.hidden=true;a.placeholderCollapse()}else{a.callParent(arguments)}},onRemoved:function(b){var a=this;if(a.placeholder&&!b){a.ownerCt.remove(a.placeholder,false)}a.callParent(arguments)},addTool:function(e){if(!Ext.isArray(e)){e=[e]}var d=this,g=d.header,c,a=e.length,b;for(c=0;c<a;c++){b=e[c];if(g&&g.isHeader){g.addTool(b)}else{d.tools.push(b)}}d.updateHeader()},getOppositeDirection:function(a){var b=Ext.Component;switch(a){case b.DIRECTION_TOP:return b.DIRECTION_BOTTOM;case b.DIRECTION_RIGHT:return b.DIRECTION_LEFT;case b.DIRECTION_BOTTOM:return b.DIRECTION_TOP;case b.DIRECTION_LEFT:return b.DIRECTION_RIGHT}},getWidthAuthority:function(){if(this.collapsed&&this.collapsedHorizontal()){return 1}return this.callParent()},getHeightAuthority:function(){if(this.collapsed&&this.collapsedVertical()){return 1}return this.callParent()},collapsedHorizontal:function(){var a=this.getCollapsed();return a=="left"||a=="right"},collapsedVertical:function(){var a=this.getCollapsed();return a=="top"||a=="bottom"},restoreDimension:function(){var a=this.collapseDirection;return(a==="top"||a==="bottom")?"height":"width"},getCollapsed:function(){var a=this;if(a.collapsed===true){return a.collapseDirection}return a.collapsed},getState:function(){var a=this,b=a.callParent(),c;b=a.addPropertyToState(b,"collapsed");if(a.collapsed){c=a.collapseMemento;c=c&&c.data;if(a.collapsedVertical()){if(b){delete b.height}if(c){b=a.addPropertyToState(b,"height",c.height)}}else{if(b){delete b.width}if(c){b=a.addPropertyToState(b,"width",c.width)}}}return b},findReExpander:function(h){var g=this,j=Ext.Component,e=g.dockedItems.items,a=e.length,b,d;if(g.collapseMode=="mini"){return}switch(h){case j.DIRECTION_TOP:case j.DIRECTION_BOTTOM:for(d=0;d<a;d++){b=e[d];if(!b.hidden){if(b.isHeader&&(!b.dock||b.dock=="top"||b.dock=="bottom")){return b}}}break;case j.DIRECTION_LEFT:case j.DIRECTION_RIGHT:for(d=0;d<a;d++){b=e[d];if(!b.hidden){if(b.isHeader&&(b.dock=="left"||b.dock=="right")){return b}}}break;default:throw ("Panel#findReExpander must be passed a valid collapseDirection")}},getReExpander:function(c){var b=this,d=c||b.collapseDirection,a=b.reExpander||b.findReExpander(d);b.expandDirection=b.getOppositeDirection(d);if(!a){b.reExpander=a=b.createReExpander(d,{dock:d,cls:Ext.baseCSSPrefix+"docked "+b.baseCls+"-"+b.ui+"-collapsed"});b.dockedItems.insert(0,a)}return a},createReExpander:function(e,d){var c=this,h=e=="left",b=e=="right",g=h||b,a=Ext.apply({hideMode:"offsets",title:c.title||"&#160;",titleAlign:c.titleAlign,orientation:g?"vertical":"horizontal",textCls:c.headerTextCls,icon:c.icon,iconCls:c.iconCls,glyph:c.glyph,baseCls:c.self.prototype.baseCls+"-header",ui:c.ui,frame:c.frame&&c.frameHeader,ignoreParentFrame:c.frame||c.overlapHeader,indicateDrag:c.draggable,collapseImmune:true,ownerCt:c.ownerCt,ownerLayout:c.componentLayout},d);if(c.collapseMode=="mini"){if(g){a.width=1}else{a.height=1}}if(!c.hideCollapseTool){if(h||(b&&c.isPlaceHolderCollapse())){a.titlePosition=1}a.tools=[{xtype:"tool",type:"expand-"+c.getOppositeDirection(e),uiCls:["top"],handler:c.toggleCollapse,scope:c}]}a=new Ext.panel.Header(a);a.addClsWithUI(c.getHeaderCollapsedClasses(a));return a},getHeaderCollapsedClasses:function(d){var b=this,c=b.collapsedCls,a;a=[c,c+"-"+d.getDockName()];if(b.border&&(!b.frame||(b.frame&&Ext.supports.CSS3BorderRadius))){a.push(c+"-border-"+d.getDockName())}return a},beginCollapse:function(){var e=this,c=e.lastBox,h=e.rendered,b=e.collapseMemento||(e.collapseMemento=new Ext.util.Memento(e)),d=e.getSizeModel(),g=e.header,a;b.capture(["height","minHeight","width","minWidth"]);if(c){b.capture(e.restoreDimension(),c,"last.")}if(e.collapsedVertical()){if(d.width.shrinkWrap){e.width=h?e.getWidth():e.width||e.minWidth||100}delete e.height;e.minHeight=0}else{if(e.collapsedHorizontal()){if(d.height.shrinkWrap){e.height=h?e.getHeight():e.height||e.minHeight||100}delete e.width;e.minWidth=0}}if(e.ownerCt){e.ownerCt.getLayout().beginCollapse(e)}if(!e.isPlaceHolderCollapse()&&g!==false){if(g===(a=e.getReExpander())){g.collapseImmune=true;g.getHierarchyState().collapseImmune=true;g.addClsWithUI(e.getHeaderCollapsedClasses(g));if(g.rendered){g.updateFrame()}}else{if(a.el){a.el.show();a.hidden=false}}}if(e.resizer){e.resizer.disable()}},beginExpand:function(){var e=this,d=e.lastBox,c=e.collapseMemento,a=this.restoreDimension(),g=e.header,b;if(c){c.restore(["minHeight","minWidth",a]);if(d){c.restore(a,true,d,"last.")}}if(e.ownerCt){e.ownerCt.getLayout().beginExpand(e)}if(!e.isPlaceHolderCollapse()&&g!==false){if(g===(b=e.getReExpander())){delete g.collapseImmune;delete g.getHierarchyState().collapseImmune;g.removeClsWithUI(e.getHeaderCollapsedClasses(g));if(g.rendered){g.updateFrame()}}else{b.hidden=true;b.el.hide()}}if(e.resizer){e.resizer.enable()}},collapse:function(d,a){var c=this,e=d||c.collapseDirection,b=c.ownerCt;if(c.isCollapsingOrExpanding){return c}if(arguments.length<2){a=c.animCollapse}if(c.collapsed||c.fireEvent("beforecollapse",c,d,a)===false){return c}if(b&&c.isPlaceHolderCollapse()){return c.placeholderCollapse(d,a)}c.collapsed=e;c.beginCollapse();c.getHierarchyState().collapsed=true;c.fireHierarchyEvent("collapse");return c.doCollapseExpand(1,a)},doCollapseExpand:function(a,b){var d=this,c=d.animCollapse,e=d.ownerLayout;d.animCollapse=b;d.isCollapsingOrExpanding=a;if(b){d.addCls(Ext.baseCSSPrefix+"animating-size")}if(e&&!b){e.onContentChange(d)}else{d.updateLayout({isRoot:true})}d.animCollapse=c;return d},afterCollapse:function(b){var a=this,c=a.ownerLayout;a.isCollapsingOrExpanding=0;if(a.collapseTool){a.collapseTool.setType("expand-"+a.getOppositeDirection(a.collapseDirection))}if(b){a.removeCls(Ext.baseCSSPrefix+"animating-size")}if(c&&b){c.onContentChange(a)}a.setHiddenDocked();a.fireEvent("collapse",a)},setHiddenDocked:function(){var h=this,d=h.hiddenOnCollapse,c=h.getDockedItems(),a=c.length,e=0,g,b;if(h.header!==false){b=h.getReExpander()}d.add(h.body);for(;e<a;e++){g=c[e];if(g&&g!==b&&g.el){d.add(g.el)}}d.setStyle("visibility","hidden")},restoreHiddenDocked:function(){var a=this.hiddenOnCollapse;a.setStyle("visibility","");a.clear()},getPlaceholder:function(e){var d=this,h=e||d.collapseDirection,c=null,g=d.placeholder,b=d.floatable,a=d.titleCollapse;if(!g){if(b||(d.collapsible&&a)){c={click:{fn:(!a&&b)?d.floatCollapsedPanel:d.toggleCollapse,element:"el",scope:d}}}d.placeholder=g=Ext.widget(d.createReExpander(h,{id:d.id+"-placeholder",listeners:c}))}if(!g.placeholderFor){if(!g.isComponent){d.placeholder=g=d.lookupComponent(g)}Ext.applyIf(g,{margins:d.margins,placeholderFor:d});g.addCls([Ext.baseCSSPrefix+"region-collapsed-placeholder",Ext.baseCSSPrefix+"region-collapsed-"+h+"-placeholder",d.collapsedCls])}return g},placeholderCollapse:function(g,a){var d=this,c=d.ownerCt,i=g||d.collapseDirection,b=Ext.baseCSSPrefix+"border-region-slide-in",h=d.getPlaceholder(g),e;d.isCollapsingOrExpanding=1;d.hidden=true;d.collapsed=i;if(h.rendered){if(h.el.dom.parentNode!==d.el.dom.parentNode){d.el.dom.parentNode.insertBefore(h.el.dom,d.el.dom)}h.hidden=false;h.el.show();c.updateLayout()}else{c.insert(c.items.indexOf(d),h)}if(d.rendered){d.el.setVisibilityMode(d.placeholderCollapseHideMode);if(a){d.el.addCls(b);h.el.hide();e=d.convertCollapseDir(i);d.el.slideOut(e,{preserveScroll:true,duration:Ext.Number.from(a,Ext.fx.Anim.prototype.duration),listeners:{afteranimate:function(){d.el.removeCls(b);h.el.show().setStyle("display","none").slideIn(e,{easing:"linear",duration:100,listeners:{afteranimate:function(){h.focus();d.isCollapsingOrExpanding=0;d.fireEvent("collapse",d)}}})}}})}else{d.el.hide();d.isCollapsingOrExpanding=0;d.fireEvent("collapse",d)}}else{d.isCollapsingOrExpanding=0;if(!d.preventCollapseFire){d.fireEvent("collapse",d)}}return d},floatCollapsedPanel:function(){var c=this,i=c.placeholder,h=i.getSize(),d,b=Ext.baseCSSPrefix+"border-region-slide-in",g=c.collapsed,e=c.ownerCt||c,a;if(c.isSliding){return}if(c.el.hasCls(b)){c.slideOutFloatedPanel();return}c.isSliding=true;i.el.hide();i.hidden=true;c.el.show();c.hidden=false;c.collapsed=false;e.updateLayout();d=c.getBox(false,true);i.el.show();i.hidden=false;c.el.hide();c.hidden=true;c.collapsed=g;e.updateLayout();c.slideOutTask=c.slideOutTask||new Ext.util.DelayedTask(c.slideOutFloatedPanel,c);i.el.on("mouseleave",c.onMouseLeaveFloated,c);c.el.on("mouseleave",c.onMouseLeaveFloated,c);i.el.on("mouseenter",c.onMouseEnterFloated,c);c.el.on("mouseenter",c.onMouseEnterFloated,c);c.el.addCls(b);c.floated=true;if(c.collapseTool){c.collapseTool.el.hide()}switch(c.collapsed){case"top":c.setLocalXY(d.x,d.y+h.height-1);break;case"right":c.setLocalXY(d.x-h.width+1,d.y);break;case"bottom":c.setLocalXY(d.x,d.y-h.height+1);break;case"left":c.setLocalXY(d.x+h.width-1,d.y);break}a=c.convertCollapseDir(c.collapsed);c.floatedFromCollapse=c.collapsed;c.collapsed=c.hidden=false;c.el.slideIn(a,{preserveScroll:true,duration:Ext.Number.from(c.animCollapse,Ext.fx.Anim.prototype.duration),listeners:{afteranimate:function(){c.isSliding=false;c.fireEvent("float",c)}}})},onMouseLeaveFloated:function(a){this.slideOutTask.delay(500)},onMouseEnterFloated:function(a){this.slideOutTask.cancel()},isLayoutRoot:function(){if(this.floatedFromCollapse){return true}return this.callParent()},slideOutFloatedPanel:function(){var a=this,c=this.el,b;if(a.isSliding||a.isDestroyed){return}a.isSliding=true;a.floated=false;a.slideOutFloatedPanelBegin();if(typeof a.collapsed=="string"){b=a.convertCollapseDir(a.collapsed)}c.slideOut(b,{preserveScroll:true,duration:Ext.Number.from(a.animCollapse,Ext.fx.Anim.prototype.duration),listeners:{afteranimate:function(){a.slideOutFloatedPanelEnd();a.el.removeCls(Ext.baseCSSPrefix+"border-region-slide-in")}}})},slideOutFloatedPanelBegin:function(){var b=this,c=b.placeholder.el,a=b.el;b.collapsed=b.floatedFromCollapse;b.hidden=true;b.floatedFromCollapse=null;c.un("mouseleave",b.onMouseLeaveFloated,b);a.un("mouseleave",b.onMouseLeaveFloated,b);c.un("mouseenter",b.onMouseEnterFloated,b);a.un("mouseenter",b.onMouseEnterFloated,b)},slideOutFloatedPanelEnd:function(){var a=this;if(a.collapseTool){a.collapseTool.el.show()}a.isSliding=false;a.fireEvent("unfloat",a)},expand:function(a){var b=this;if(b.isCollapsingOrExpanding){return b}if(!arguments.length){a=b.animCollapse}if(!b.collapsed&&!b.floatedFromCollapse){return b}if(b.fireEvent("beforeexpand",b,a)===false){return b}delete this.getHierarchyState().collapsed;if(b.isPlaceHolderCollapse()){return b.placeholderExpand(a)}b.restoreHiddenDocked();b.beginExpand();b.collapsed=false;return b.doCollapseExpand(2,a)},placeholderExpand:function(c){var e=this,h=e.collapsed,d=Ext.baseCSSPrefix+"border-region-slide-in",g,b,a=e.ownerLayout?e.ownerLayout.centerRegion:null;if(Ext.AbstractComponent.layoutSuspendCount){c=false}if(e.floatedFromCollapse){b=e.getPosition(true);e.slideOutFloatedPanelBegin();e.slideOutFloatedPanelEnd();e.floated=false}if(c){Ext.suspendLayouts();e.placeholder.hide();e.el.show();e.hidden=e.collapsed=false;if(a&&!b){a.hidden=true}Ext.resumeLayouts(true);a.hidden=false;e.el.addCls(d);e.isCollapsingOrExpanding=2;if(b){g=e.getXY();e.setLocalXY(b[0],b[1]);e.setXY([g[0],g[1]],{duration:Ext.Number.from(c,Ext.fx.Anim.prototype.duration),listeners:{afteranimate:function(){e.el.removeCls(d);e.isCollapsingOrExpanding=0;e.fireEvent("expand",e)}}})}else{e.el.hide();e.placeholder.el.show();e.placeholder.hidden=false;e.hidden=false;e.el.slideIn(e.convertCollapseDir(h),{preserveScroll:true,duration:Ext.Number.from(c,Ext.fx.Anim.prototype.duration),listeners:{afteranimate:function(){e.el.removeCls(d);e.placeholder.hide();e.updateLayout();e.isCollapsingOrExpanding=0;e.fireEvent("expand",e)}}})}}else{e.floated=e.collapsed=false;Ext.suspendLayouts();e.placeholder.hide();e.show();Ext.resumeLayouts(true);e.fireEvent("expand",e)}return e},afterExpand:function(b){var a=this,c=a.ownerLayout;a.isCollapsingOrExpanding=0;if(a.collapseTool){a.collapseTool.setType("collapse-"+a.collapseDirection)}if(b){a.removeCls(Ext.baseCSSPrefix+"animating-size")}if(c&&b){c.onContentChange(a)}a.fireEvent("expand",a);a.fireHierarchyEvent("expand")},setBorder:function(a,c){if(c){return}var b=this,d=b.header;if(!a){a=0}else{if(a===true){a="1px"}else{a=Ext.Element.unitizeBox(a)}}if(d){if(d.isHeader){d.setBorder(a)}else{d.border=a}}if(b.rendered&&b.bodyBorder!==false){b.body.setStyle("border-width",a)}b.updateLayout();b.border=a},toggleCollapse:function(){return(this.collapsed||this.floatedFromCollapse)?this.expand():this.collapse()},getKeyMap:function(){return this.keyMap||(this.keyMap=new Ext.util.KeyMap(Ext.apply({target:this.el},this.keys)))},initDraggable:function(){if(this.simpleDrag){this.initSimpleDraggable()}else{this.dd=new Ext.panel.DD(this,Ext.isBoolean(this.draggable)?null:this.draggable)}},initSimpleDraggable:function(){var c=this,b,a;if(!c.header){c.updateHeader(true)}if(c.header){b=Ext.applyIf({el:c.el,delegate:"#"+Ext.escapeId(c.header.id)},c.draggable);if(c.constrain||c.constrainHeader){b.constrain=c.constrain;b.constrainDelegate=c.constrainHeader;b.constrainTo=c.constrainTo||c.container}a=c.dd=new Ext.util.ComponentDragger(this,b);c.relayEvents(a,["dragstart","drag","dragend"]);if(c.maximized){a.disable()}}},ghostTools:function(){var e=[],g=this.header,d=g?g.query("tool[hidden=false]"):[],c,a,b;if(d.length){c=0;a=d.length;for(;c<a;c++){b=d[c];e.push({type:b.type})}}else{e=[{type:"placeholder"}]}return e},ghost:function(a){var d=this,b=d.ghostPanel,c=d.getBox(),e;if(!b){b=new Ext.panel.Panel({renderTo:Ext.getBody(),floating:{shadow:false},frame:d.frame&&!d.alwaysFramed,alwaysFramed:d.alwaysFramed,overlapHeader:d.overlapHeader,headerPosition:d.headerPosition,baseCls:d.baseCls,cls:d.baseCls+"-ghost "+(a||"")});d.ghostPanel=b}else{b.el.show()}d.ghostPanel.hidden=false;b.floatParent=d.floatParent;if(d.floating){b.setZIndex(Ext.Number.from(d.el.getStyle("zIndex"),0))}else{b.toFront()}if(!(d.preventHeader||(d.header===false))){e=b.header;if(e){e.suspendLayouts();Ext.Array.forEach(e.query("tool"),e.remove,e);e.resumeLayouts()}b.addTool(d.ghostTools());b.setTitle(d.title);if(d.iconCls){b.setIconCls(d.iconCls)}else{if(d.icon){b.setIcon(d.icon)}else{if(d.glyph){b.setGlyph(d.glyph)}}}b.header.addCls(Ext.baseCSSPrefix+"header-ghost")}b.setPagePosition(c.x,c.y);b.setSize(c.width,c.height);d.el.hide();return b},unghost:function(b,a){var c=this;if(!c.ghostPanel){return}if(b!==false){c.el.show();if(a!==false){c.setPagePosition(c.ghostPanel.getXY());if(c.hideMode=="offsets"){delete c.el.hideModeStyles}}Ext.defer(c.focus,10,c)}c.ghostPanel.el.hide();c.ghostPanel.hidden=true},beginDrag:function(){if(this.floatingDescendants){this.floatingDescendants.hide()}},endDrag:function(){if(this.floatingDescendants){this.floatingDescendants.show()}},initResizable:function(){this.callParent(arguments);if(this.collapsed){this.resizer.disable()}},convertCollapseDir:function(a){return a.substr(0,1)}},function(){this.prototype.animCollapse=Ext.enableFx});Ext.define("Ext.tip.Tip",{extend:Ext.panel.Panel,alternateClassName:"Ext.Tip",minWidth:40,maxWidth:300,shadow:"sides",defaultAlign:"tl-bl?",constrainPosition:true,autoRender:true,hidden:true,baseCls:Ext.baseCSSPrefix+"tip",floating:{shadow:true,shim:true},focusOnToFront:false,closeAction:"hide",ariaRole:"tooltip",alwaysFramed:true,frameHeader:false,initComponent:function(){var a=this;a.floating=Ext.apply({},{shadow:a.shadow,constrain:a.constrainPosition},a.self.prototype.floating);a.callParent(arguments);a.constrain=a.constrain||a.constrainPosition},showAt:function(b){var a=this;this.callParent(arguments);if(a.isVisible()){a.setPagePosition(b[0],b[1]);if(a.constrainPosition||a.constrain){a.doConstrain()}a.toFront(true)}},showBy:function(a,b){this.showAt(this.getAlignToXY(a,b||this.defaultAlign))},initDraggable:function(){var a=this;a.draggable={el:a.getDragEl(),delegate:a.header.el,constrain:a,constrainTo:a.el.dom.parentNode};Ext.Component.prototype.initDraggable.call(a)},ghost:undefined,unghost:undefined});Ext.define("Ext.tip.ToolTip",{extend:Ext.tip.Tip,alias:"widget.tooltip",alternateClassName:"Ext.ToolTip",autoHide:true,showDelay:500,hideDelay:200,dismissDelay:5000,trackMouse:false,anchorToTarget:true,anchorOffset:0,targetCounter:0,quickShowInterval:250,initComponent:function(){var a=this;a.callParent(arguments);a.lastActive=new Date();a.setTarget(a.target);a.origAnchor=a.anchor},onRender:function(b,a){var c=this;c.callParent(arguments);c.anchorCls=Ext.baseCSSPrefix+"tip-anchor-"+c.getAnchorPosition();c.anchorEl=c.el.createChild({cls:Ext.baseCSSPrefix+"tip-anchor "+c.anchorCls})},setTarget:function(d){var b=this,a=Ext.get(d),c;if(b.target){c=Ext.get(b.target);b.mun(c,"mouseover",b.onTargetOver,b);b.mun(c,"mouseout",b.onTargetOut,b);b.mun(c,"mousemove",b.onMouseMove,b)}b.target=a;if(a){b.mon(a,{freezeEvent:true,mouseover:b.onTargetOver,mouseout:b.onTargetOut,mousemove:b.onMouseMove,scope:b})}if(b.anchor){b.anchorTarget=b.target}},onMouseMove:function(d){var b=this,a=b.delegate?d.getTarget(b.delegate):b.triggerElement=true,c;if(a){b.targetXY=d.getXY();if(a===b.triggerElement){if(!b.hidden&&b.trackMouse){c=b.getTargetXY();if(b.constrainPosition){c=b.el.adjustForConstraints(c,b.el.parent())}b.setPagePosition(c)}}else{b.hide();b.lastActive=new Date(0);b.onTargetOver(d)}}else{if((!b.closable&&b.isVisible())&&b.autoHide!==false){b.hide()}}},getTargetXY:function(){var j=this,d,c,n,a,i,l,e,m,k,b,h,g;if(j.delegate){j.anchorTarget=j.triggerElement}if(j.anchor){j.targetCounter++;c=j.getOffsets();n=(j.anchorToTarget&&!j.trackMouse)?j.getAlignToXY(j.anchorTarget,j.getAnchorAlign()):j.targetXY;a=Ext.Element.getViewWidth()-5;i=Ext.Element.getViewHeight()-5;l=document.documentElement;e=document.body;m=(l.scrollLeft||e.scrollLeft||0)+5;k=(l.scrollTop||e.scrollTop||0)+5;b=[n[0]+c[0],n[1]+c[1]];h=j.getSize();g=j.constrainPosition;j.anchorEl.removeCls(j.anchorCls);if(j.targetCounter<2&&g){if(b[0]<m){if(j.anchorToTarget){j.defaultAlign="l-r";if(j.mouseOffset){j.mouseOffset[0]*=-1}}j.anchor="left";return j.getTargetXY()}if(b[0]+h.width>a){if(j.anchorToTarget){j.defaultAlign="r-l";if(j.mouseOffset){j.mouseOffset[0]*=-1}}j.anchor="right";return j.getTargetXY()}if(b[1]<k){if(j.anchorToTarget){j.defaultAlign="t-b";if(j.mouseOffset){j.mouseOffset[1]*=-1}}j.anchor="top";return j.getTargetXY()}if(b[1]+h.height>i){if(j.anchorToTarget){j.defaultAlign="b-t";if(j.mouseOffset){j.mouseOffset[1]*=-1}}j.anchor="bottom";return j.getTargetXY()}}j.anchorCls=Ext.baseCSSPrefix+"tip-anchor-"+j.getAnchorPosition();j.anchorEl.addCls(j.anchorCls);j.targetCounter=0;return b}else{d=j.getMouseOffset();return(j.targetXY)?[j.targetXY[0]+d[0],j.targetXY[1]+d[1]]:d}},getMouseOffset:function(){var a=this,b=a.anchor?[0,0]:[15,18];if(a.mouseOffset){b[0]+=a.mouseOffset[0];b[1]+=a.mouseOffset[1]}return b},getAnchorPosition:function(){var b=this,a;if(b.anchor){b.tipAnchor=b.anchor.charAt(0)}else{a=b.defaultAlign.match(/^([a-z]+)-([a-z]+)(\?)?$/);b.tipAnchor=a[1].charAt(0)}switch(b.tipAnchor){case"t":return"top";case"b":return"bottom";case"r":return"right"}return"left"},getAnchorAlign:function(){switch(this.anchor){case"top":return"tl-bl";case"left":return"tl-tr";case"right":return"tr-tl";default:return"bl-tl"}},getOffsets:function(){var c=this,d,b,a=c.getAnchorPosition().charAt(0);if(c.anchorToTarget&&!c.trackMouse){switch(a){case"t":b=[0,9];break;case"b":b=[0,-13];break;case"r":b=[-13,0];break;default:b=[9,0];break}}else{switch(a){case"t":b=[-15-c.anchorOffset,30];break;case"b":b=[-19-c.anchorOffset,-13-c.el.dom.offsetHeight];break;case"r":b=[-15-c.el.dom.offsetWidth,-13-c.anchorOffset];break;default:b=[25,-13-c.anchorOffset];break}}d=c.getMouseOffset();b[0]+=d[0];b[1]+=d[1];return b},onTargetOver:function(c){var b=this,a;if(b.disabled||c.within(b.target.dom,true)){return}a=c.getTarget(b.delegate);if(a){b.triggerElement=a;b.triggerEvent=c;b.clearTimer("hide");b.targetXY=c.getXY();b.delayShow()}},delayShow:function(){var a=this;if(a.hidden&&!a.showTimer){if(Ext.Date.getElapsed(a.lastActive)<a.quickShowInterval){a.show()}else{a.showTimer=Ext.defer(a.showFromDelay,a.showDelay,a)}}else{if(!a.hidden&&a.autoHide!==false){a.show()}}},showFromDelay:function(){this.fromDelayShow=true;this.show();delete this.fromDelayShow},onShowVeto:function(){this.callParent();delete this.triggerElement;this.clearTimer("show")},onTargetOut:function(b){var a=this;if(a.disabled||b.within(a.target.dom,true)){return}a.clearTimer("show");if(a.autoHide!==false){a.delayHide()}},delayHide:function(){var a=this;if(!a.hidden&&!a.hideTimer){a.hideTimer=Ext.defer(a.hide,a.hideDelay,a)}},hide:function(){var a=this;a.clearTimer("dismiss");a.lastActive=new Date();if(a.anchorEl){a.anchorEl.hide()}a.callParent(arguments);delete a.triggerElement},show:function(){var a=this;this.callParent();if(this.hidden===false){a.setPagePosition(-10000,-10000);if(a.anchor){a.anchor=a.origAnchor}if(!a.calledFromShowAt){a.showAt(a.getTargetXY())}if(a.anchor){a.syncAnchor();a.anchorEl.show()}else{a.anchorEl.hide()}}},showAt:function(b){var a=this;a.lastActive=new Date();a.clearTimers();a.calledFromShowAt=true;if(!a.isVisible()){this.callParent(arguments)}if(a.isVisible()){a.setPagePosition(b[0],b[1]);if(a.constrainPosition||a.constrain){a.doConstrain()}a.toFront(true);a.el.sync(true);if(a.dismissDelay&&a.autoHide!==false){a.dismissTimer=Ext.defer(a.hide,a.dismissDelay,a)}if(a.anchor){a.syncAnchor();if(!a.anchorEl.isVisible()){a.anchorEl.show()}}else{a.anchorEl.hide()}}delete a.calledFromShowAt},syncAnchor:function(){var c=this,a,b,d;switch(c.tipAnchor.charAt(0)){case"t":a="b";b="tl";d=[20+c.anchorOffset,1];break;case"r":a="l";b="tr";d=[-1,12+c.anchorOffset];break;case"b":a="t";b="bl";d=[20+c.anchorOffset,-1];break;default:a="r";b="tl";d=[1,12+c.anchorOffset];break}c.anchorEl.alignTo(c.el,a+"-"+b,d);c.anchorEl.setStyle("z-index",parseInt(c.el.getZIndex(),10)||0+1).setVisibilityMode(Ext.Element.DISPLAY)},setPagePosition:function(a,c){var b=this;b.callParent(arguments);if(b.anchor){b.syncAnchor()}},clearTimer:function(a){a=a+"Timer";clearTimeout(this[a]);delete this[a]},clearTimers:function(){var a=this;a.clearTimer("show");a.clearTimer("dismiss");a.clearTimer("hide")},onShow:function(){var a=this;a.callParent();a.mon(Ext.getDoc(),"mousedown",a.onDocMouseDown,a)},onHide:function(){var a=this;a.callParent();a.mun(Ext.getDoc(),"mousedown",a.onDocMouseDown,a)},onDocMouseDown:function(b){var a=this;if(!a.closable&&!b.within(a.el.dom)){a.disable();Ext.defer(a.doEnable,100,a)}},doEnable:function(){if(!this.isDestroyed){this.enable()}},onDisable:function(){this.callParent();this.clearTimers();this.hide()},beforeDestroy:function(){var a=this;a.clearTimers();Ext.destroy(a.anchorEl);delete a.anchorEl;delete a.target;delete a.anchorTarget;delete a.triggerElement;a.callParent()},onDestroy:function(){Ext.getDoc().un("mousedown",this.onDocMouseDown,this);this.callParent()}});Ext.define("Ext.tip.QuickTip",{extend:Ext.tip.ToolTip,alias:"widget.quicktip",alternateClassName:"Ext.QuickTip",interceptTitles:false,title:"&#160;",tagConfig:{namespace:"data-",attribute:"qtip",width:"qwidth",target:"target",title:"qtitle",hide:"hide",cls:"qclass",align:"qalign",anchor:"anchor",showDelay:"qshowDelay"},initComponent:function(){var a=this;a.target=a.target||Ext.getDoc();a.targets=a.targets||{};a.callParent()},register:function(c){var h=Ext.isArray(c)?c:arguments,d=0,a=h.length,g,b,e;for(;d<a;d++){c=h[d];g=c.target;if(g){if(Ext.isArray(g)){for(b=0,e=g.length;b<e;b++){this.targets[Ext.id(g[b])]=c}}else{this.targets[Ext.id(g)]=c}}}},unregister:function(a){delete this.targets[Ext.id(a)]},cancelShow:function(a){var b=this,c=b.activeTarget;a=Ext.get(a).dom;if(b.isVisible()){if(c&&c.el==a){b.hide()}}else{if(c&&c.el==a){b.clearTimer("show")}}},getTipCfg:function(d){var c=d.getTarget(),b=c.title,a;if(this.interceptTitles&&b&&Ext.isString(b)){c.qtip=b;c.removeAttribute("title");d.preventDefault();return{text:b}}else{a=this.tagConfig;c=d.getTarget("["+a.namespace+a.attribute+"]");if(c){return{target:c,text:c.getAttribute(a.namespace+a.attribute)}}}},onTargetOver:function(i){var k=this,j=i.getTarget(k.delegate),a,d,b,h,l,c,n,g,p,m,o;if(k.disabled){return}k.targetXY=i.getXY();if(!j||j.nodeType!==1||j==document.documentElement||j==document.body){return}if(k.activeTarget&&((j==k.activeTarget.el)||Ext.fly(k.activeTarget.el).contains(j))){if(k.targetTextEmpty()){k.onShowVeto();delete k.activeTarget}else{k.clearTimer("hide");k.show()}return}if(j){g=k.targets;for(o in g){if(g.hasOwnProperty(o)){m=g[o];p=Ext.fly(m.target);if(p&&(p.dom===j||p.contains(j))){b=p.dom;break}}}if(b){k.activeTarget=k.targets[b.id];k.activeTarget.el=j;k.anchor=k.activeTarget.anchor;if(k.anchor){k.anchorTarget=j}a=parseInt(k.activeTarget.showDelay,10);if(a){d=k.showDelay;k.showDelay=a}k.delayShow();if(a){k.showDelay=d}return}}b=Ext.fly(j,"_quicktip-target");h=k.tagConfig;l=h.namespace;c=k.getTipCfg(i);if(c){if(c.target){j=c.target;b=Ext.fly(j,"_quicktip-target")}n=b.getAttribute(l+h.hide);k.activeTarget={el:j,text:c.text,width:+b.getAttribute(l+h.width)||null,autoHide:n!="user"&&n!=="false",title:b.getAttribute(l+h.title),cls:b.getAttribute(l+h.cls),align:b.getAttribute(l+h.align),showDelay:parseInt(b.getAttribute(l+h.showDelay),10)};k.anchor=b.getAttribute(l+h.anchor);if(k.anchor){k.anchorTarget=j}a=parseInt(k.activeTarget.showDelay,10);if(a){d=k.showDelay;k.showDelay=a}k.delayShow();if(a){k.showDelay=d}}},onTargetOut:function(g){var c=this,d=c.activeTarget,a,b;if(d&&g.within(c.activeTarget.el)&&!c.getTipCfg(g)){return}c.clearTimer("show");delete c.activeTarget;if(c.autoHide!==false){a=d&&parseInt(d.hideDelay,10);if(a){b=c.hideDelay;c.hideDelay=a}c.delayHide();if(a){c.hideDelay=b}}},targetTextEmpty:function(){var c=this,d=c.activeTarget,a=c.tagConfig,b,e;if(d){b=d.el;if(b){e=b.getAttribute(a.namespace+a.attribute);if(!e&&!c.targets[d.target]){return true}}}return false},show:function(){var b=this,a=b.fromDelayShow;if(a&&b.targetTextEmpty()){b.onShowVeto();delete b.activeTarget;return}b.callParent(arguments)},showAt:function(d){var b=this,c=b.activeTarget,e=b.header,a;if(c){if(!b.rendered){b.render(Ext.getBody());b.activeTarget=c}b.suspendLayouts();if(c.title){b.setTitle(c.title);e.show()}else{if(e){e.hide()}}b.update(c.text);b.autoHide=c.autoHide;b.dismissDelay=c.dismissDelay||b.dismissDelay;if(c.mouseOffset){d[0]+=c.mouseOffset[0];d[1]+=c.mouseOffset[1]}a=b.lastCls;if(a){b.removeCls(a);delete b.lastCls}a=c.cls;if(a){b.addCls(a);b.lastCls=a}b.setWidth(c.width);if(b.anchor){b.constrainPosition=false}else{if(c.align){d=b.getAlignToXY(c.el,c.align);b.constrainPosition=false}else{b.constrainPosition=true}}b.resumeLayouts(true)}b.callParent([d])},hide:function(){delete this.activeTarget;this.callParent()}});Ext.define("Ext.tip.QuickTipManager",(function(){var b,a=false;return{singleton:true,alternateClassName:"Ext.QuickTips",init:function(g,d){if(!b){if(!Ext.isReady){Ext.onReady(function(){Ext.tip.QuickTipManager.init(g,d)});return}var c=Ext.apply({disabled:a,id:"ext-quicktips-tip"},d),e=c.className,h=c.xtype;if(e){delete c.className}else{if(h){e="widget."+h;delete c.xtype}}if(g!==false){c.renderTo=document.body}b=Ext.create(e||"Ext.tip.QuickTip",c);Ext.quickTipsActive=true}},destroy:function(){if(b){var c;b.destroy();b=c}},ddDisable:function(){if(b&&!a){b.disable()}},ddEnable:function(){if(b&&!a){b.enable()}},enable:function(){if(b){b.enable()}a=false},disable:function(){if(b){b.disable()}a=true},isEnabled:function(){return b!==undefined&&!b.disabled},getQuickTip:function(){return b},register:function(){b.register.apply(b,arguments)},unregister:function(){b.unregister.apply(b,arguments)},tips:function(){b.register.apply(b,arguments)}}}()));Ext.define("Ext.app.Application",{extend:Ext.app.Controller,scope:undefined,enableQuickTips:true,appFolder:"app",appProperty:"app",namespaces:[],autoCreateViewport:false,paths:null,onClassExtended:function(i,c,h){var b=Ext.app.Controller,d=i.prototype,a=c.name,k=[],e,j,g;c.$namespace=c.name;Ext.app.addNamespaces(c.name);if(c.namespaces){Ext.app.addNamespaces(c.namespaces)}if(!c["paths processed"]){Ext.Loader.setPath(c.name,c.appFolder||"app");j=c.paths;if(j){for(g in j){if(j.hasOwnProperty(g)){Ext.Loader.setPath(g,j[g])}}}}else{delete c["paths processed"]}if(c.autoCreateViewport){b.processDependencies(d,k,a,"view",["Viewport"])}if(k.length){e=h.onBeforeCreated;h.onBeforeCreated=function(l,n){var m=Ext.Array.clone(arguments);Ext.require(k,function(){return e.apply(this,m)})}}},constructor:function(a){var b=this;b.callParent(arguments);b.doInit(b);b.initNamespace();b.initControllers();b.onBeforeLaunch()},initNamespace:function(){var c=this,a=c.appProperty,b;b=Ext.namespace(c.name);if(b){b.getApplication=function(){return c};if(a){if(!b[a]){b[a]=c}}}},initControllers:function(){var c=this,d=Ext.Array.from(c.controllers);c.controllers=new Ext.util.MixedCollection();for(var a=0,b=d.length;a<b;a++){c.getController(d[a])}},launch:Ext.emptyFn,onBeforeLaunch:function(){var b=this,e,g,d,a;if(b.enableQuickTips){b.initQuickTips()}if(b.autoCreateViewport){b.initViewport()}b.launch.call(b.scope||b);b.launched=true;b.fireEvent("launch",b);e=b.controllers.items;d=e.length;for(g=0;g<d;g++){a=e[g];a.onLaunch(b)}},getModuleClassName:function(a,b){return Ext.app.Controller.getFullName(a,b,this.name).absoluteName},initQuickTips:function(){Ext.tip.QuickTipManager.init()},initViewport:function(){var a=this.getView("Viewport");if(a){a.create()}},getController:function(b){var d=this,e=d.controllers,c,a;a=e.get(b);if(!a){c=d.getModuleClassName(b,"controller");a=Ext.create(c,{application:d,id:b});e.add(a);if(d._initialized){a.doInit(d)}}return a},getApplication:function(){return this}});Ext.define("Ext.app.domain.Controller",{extend:Ext.app.EventDomain,singleton:true,type:"controller",idProperty:"id",constructor:function(){var a=this;a.callParent();a.monitor(Ext.app.Controller)}});Ext.define("Ext.direct.Provider",{alias:"direct.provider",mixins:{observable:Ext.util.Observable},isProvider:true,constructor:function(a){var b=this;Ext.apply(b,a);Ext.applyIf(b,{id:Ext.id(null,"provider-")});b.addEvents("connect","disconnect","data","exception");b.mixins.observable.constructor.call(b,a)},isConnected:function(){return false},connect:Ext.emptyFn,disconnect:Ext.emptyFn});Ext.define("Ext.app.domain.Direct",{extend:Ext.app.EventDomain,singleton:true,type:"direct",idProperty:"id",constructor:function(){var a=this;a.callParent();a.monitor(Ext.direct.Provider)}});Ext.define("Ext.button.Split",{alias:"widget.splitbutton",extend:Ext.button.Button,alternateClassName:"Ext.SplitButton",arrowCls:"split",split:true,initComponent:function(){this.callParent();this.addEvents("arrowclick")},setArrowHandler:function(b,a){this.arrowHandler=b;this.scope=a},onClick:function(c,a){var b=this;c.preventDefault();if(!b.disabled){if(b.overMenuTrigger){b.maybeShowMenu();b.fireEvent("arrowclick",b,c);if(b.arrowHandler){b.arrowHandler.call(b.scope||b,b,c)}}else{b.doToggle();b.fireHandler(c)}}}});Ext.define("Ext.button.Cycle",{alias:"widget.cycle",extend:Ext.button.Split,alternateClassName:"Ext.CycleButton",getButtonText:function(b){var a=this,c="";if(b&&a.showText===true){if(a.prependText){c+=a.prependText}c+=b.text;return c}return a.text},setActiveItem:function(c,a){var b=this;if(!Ext.isObject(c)){c=b.menu.getComponent(c)}if(c){if(!b.rendered){b.text=b.getButtonText(c);b.iconCls=c.iconCls;b.glyph=c.glyph}else{b.setText(b.getButtonText(c));b.setIconCls(c.iconCls);b.setGlyph(c.glyph)}b.activeItem=c;if(!c.checked){c.setChecked(true,false)}if(b.forceIcon){b.setIconCls(b.forceIcon)}if(b.forceGlyph){b.setGlyph(b.forceGlyph)}if(!a){b.fireEvent("change",b,c)}}},getActiveItem:function(){return this.activeItem},initComponent:function(){var g=this,e=0,b,c,a,d;g.addEvents("change");if(g.changeHandler){g.on("change",g.changeHandler,g.scope||g);delete g.changeHandler}b=(g.menu.items||[]).concat(g.items||[]);g.menu=Ext.applyIf({cls:Ext.baseCSSPrefix+"cycle-menu",items:[]},g.menu);a=b.length;for(c=0;c<a;c++){d=b[c];d=Ext.applyIf({group:g.id,itemIndex:c,checkHandler:g.checkHandler,scope:g,checked:d.checked||false},d);g.menu.items.push(d);if(d.checked){e=c}}g.itemCount=g.menu.items.length;g.callParent(arguments);g.on("click",g.toggleSelected,g);g.setActiveItem(e,g);if(g.width&&g.showText){g.addCls(Ext.baseCSSPrefix+"cycle-fixed-width")}},checkHandler:function(a,b){if(b){this.setActiveItem(a)}},toggleSelected:function(){var c=this,a=c.menu,b;b=c.activeItem.next(":not([disabled])")||a.items.getAt(0);b.setChecked(true)}});Ext.define("Ext.chart.Callout",{constructor:function(a){if(a.callouts){a.callouts.styles=Ext.applyIf(a.callouts.styles||{},{color:"#000",font:"11px Helvetica, sans-serif"});this.callouts=Ext.apply(this.callouts||{},a.callouts);this.calloutsArray=[]}},renderCallouts:function(){if(!this.callouts){return}var v=this,m=v.items,a=v.chart.animate,u=v.callouts,h=u.styles,e=v.calloutsArray,b=v.chart.getChartStore(),s=b.getCount(),d=m.length/s,l=[],r,c,q,n,t,g,k,o;for(r=0,c=0;r<s;r++){for(q=0;q<d;q++){t=m[c];g=e[c];k=b.getAt(r);o=(!u.filter||u.filter(k));if(!o&&!g){c++;continue}if(!g){e[c]=g=v.onCreateCallout(k,t,r,o,q,c)}for(n in g){if(g[n]&&g[n].setAttributes){g[n].setAttributes(h,true)}}if(!o){for(n in g){if(g[n]){if(g[n].setAttributes){g[n].setAttributes({hidden:true},true)}else{if(g[n].setVisible){g[n].setVisible(false)}}}}}if(u&&u.renderer){u.renderer(g,k)}v.onPlaceCallout(g,k,t,r,o,a,q,c,l);l.push(g);c++}}this.hideCallouts(c)},onCreateCallout:function(g,n,e,j){var k=this,l=k.calloutsGroup,d=k.callouts,o=(d?d.styles:undefined),c=(o?o.width:0),m=(o?o.height:0),h=k.chart,b=h.surface,a={lines:false};a.lines=b.add(Ext.apply({},{type:"path",path:"M0,0",stroke:k.getLegendColor()||"#555"},o));if(d.items){a.panel=new Ext.Panel({style:"position: absolute;",width:c,height:m,items:d.items,renderTo:h.el})}return a},hideCallouts:function(b){var d=this.calloutsArray,a=d.length,e,c;while(a-->b){e=d[a];for(c in e){if(e[c]){e[c].hide(true)}}}}});Ext.define("Ext.draw.CompositeSprite",{extend:Ext.util.MixedCollection,mixins:{animate:Ext.util.Animate},autoDestroy:false,isCompositeSprite:true,constructor:function(a){var b=this;a=a||{};Ext.apply(b,a);b.addEvents("mousedown","mouseup","mouseover","mouseout","click");b.id=Ext.id(null,"ext-sprite-group-");b.callParent()},onClick:function(a){this.fireEvent("click",a)},onMouseUp:function(a){this.fireEvent("mouseup",a)},onMouseDown:function(a){this.fireEvent("mousedown",a)},onMouseOver:function(a){this.fireEvent("mouseover",a)},onMouseOut:function(a){this.fireEvent("mouseout",a)},attachEvents:function(b){var a=this;b.on({scope:a,mousedown:a.onMouseDown,mouseup:a.onMouseUp,mouseover:a.onMouseOver,mouseout:a.onMouseOut,click:a.onClick})},add:function(b,c){var a=this.callParent(arguments);this.attachEvents(a);return a},insert:function(a,b,c){return this.callParent(arguments)},remove:function(b){var a=this;b.un({scope:a,mousedown:a.onMouseDown,mouseup:a.onMouseUp,mouseover:a.onMouseOver,mouseout:a.onMouseOut,click:a.onClick});return a.callParent(arguments)},getBBox:function(){var e=0,n,j,k=this.items,g=this.length,h=Infinity,c=h,m=-h,b=h,l=-h,d,a;for(;e<g;e++){n=k[e];if(n.el&&!n.bboxExcluded){j=n.getBBox();c=Math.min(c,j.x);b=Math.min(b,j.y);m=Math.max(m,j.height+j.y);l=Math.max(l,j.width+j.x)}}return{x:c,y:b,height:m-b,width:l-c}},setAttributes:function(c,e){var d=0,b=this.items,a=this.length;for(;d<a;d++){b[d].setAttributes(c,e)}return this},hide:function(d){var c=0,b=this.items,a=this.length;for(;c<a;c++){b[c].hide(d)}return this},show:function(d){var c=0,b=this.items,a=this.length;for(;c<a;c++){b[c].show(d)}return this},redraw:function(){var e=this,d=0,c=e.items,b=e.getSurface(),a=e.length;if(b){for(;d<a;d++){b.renderItem(c[d])}}return e},setStyle:function(g){var c=0,b=this.items,a=this.length,e,d;for(;c<a;c++){e=b[c];d=e.el;if(d){d.setStyle(g)}}},addCls:function(e){var d=0,c=this.items,b=this.getSurface(),a=this.length;if(b){for(;d<a;d++){b.addCls(c[d],e)}}},removeCls:function(e){var d=0,c=this.items,b=this.getSurface(),a=this.length;if(b){for(;d<a;d++){b.removeCls(c[d],e)}}},getSurface:function(){var a=this.first();if(a){return a.surface}return null},destroy:function(){var d=this,a=d.getSurface(),c=d.autoDestroy,b;if(a){while(d.getCount()>0){b=d.first();d.remove(b);a.remove(b,c)}}d.clearListeners()}});Ext.define("Ext.draw.Surface",{mixins:{observable:Ext.util.Observable},separatorRe:/[, ]+/,enginePriority:["Svg","Vml"],statics:{create:function(b,d){d=d||this.prototype.enginePriority;var c=0,a=d.length;for(;c<a;c++){if(Ext.supports[d[c]]){return Ext.create("Ext.draw.engine."+d[c],b)}}return false},save:function(a,b){b=b||{};var e={"image/png":"Image","image/jpeg":"Image","image/svg+xml":"Svg"},d=e[b.type]||"Svg",c=Ext.draw.engine[d+"Exporter"];return c.generate(a,b)}},availableAttrs:{blur:0,"clip-rect":"0 0 1e9 1e9",cursor:"default",cx:0,cy:0,"dominant-baseline":"auto",fill:"none","fill-opacity":1,font:'10px "Arial"',"font-family":'"Arial"',"font-size":"10","font-style":"normal","font-weight":400,gradient:"",height:0,hidden:false,href:"http://sencha.com/",opacity:1,path:"M0,0",radius:0,rx:0,ry:0,scale:"1 1",src:"",stroke:"none","stroke-dasharray":"","stroke-linecap":"butt","stroke-linejoin":"butt","stroke-miterlimit":0,"stroke-opacity":1,"stroke-width":1,target:"_blank",text:"","text-anchor":"middle",title:"Ext Draw",width:0,x:0,y:0,zIndex:0},container:undefined,height:352,width:512,x:0,y:0,orderSpritesByZIndex:true,constructor:function(a){var b=this;a=a||{};Ext.apply(b,a);b.domRef=Ext.getDoc().dom;b.customAttributes={};b.addEvents("mousedown","mouseup","mouseover","mouseout","mousemove","mouseenter","mouseleave","click","dblclick");b.mixins.observable.constructor.call(b);b.getId();b.initGradients();b.initItems();if(b.renderTo){b.render(b.renderTo);delete b.renderTo}b.initBackground(a.background)},initSurface:Ext.emptyFn,renderItem:Ext.emptyFn,renderItems:Ext.emptyFn,setViewBox:function(b,d,c,a){if(isFinite(b)&&isFinite(d)&&isFinite(c)&&isFinite(a)){this.viewBox={x:b,y:d,width:c,height:a};this.applyViewBox()}},addCls:Ext.emptyFn,removeCls:Ext.emptyFn,setStyle:Ext.emptyFn,initGradients:function(){if(this.hasOwnProperty("gradients")){var a=this.gradients,b=this.addGradient,d,c;if(a){for(d=0,c=a.length;d<c;d++){if(b.call(this,a[d],d,c)===false){break}}}}},initItems:function(){var a=this.items;this.items=new Ext.draw.CompositeSprite();this.items.autoDestroy=true;this.groups=new Ext.draw.CompositeSprite();if(a){this.add(a)}},initBackground:function(b){var d=this,c=d.width,a=d.height,e,g;if(Ext.isString(b)){b={fill:b}}if(b){if(b.gradient){g=b.gradient;e=g.id;d.addGradient(g);d.background=d.add({type:"rect",x:0,y:0,width:c,height:a,fill:"url(#"+e+")",zIndex:-1})}else{if(b.fill){d.background=d.add({type:"rect",x:0,y:0,width:c,height:a,fill:b.fill,zIndex:-1})}else{if(b.image){d.background=d.add({type:"image",x:0,y:0,width:c,height:a,src:b.image,zIndex:-1})}}}d.background.bboxExcluded=true}},setSize:function(a,b){this.applyViewBox()},scrubAttrs:function(d){var c,b={},a={},e=d.attr;for(c in e){if(this.translateAttrs.hasOwnProperty(c)){b[this.translateAttrs[c]]=e[c];a[this.translateAttrs[c]]=true}else{if(this.availableAttrs.hasOwnProperty(c)&&!a[c]){b[c]=e[c]}}}return b},onClick:function(a){this.processEvent("click",a)},onDblClick:function(a){this.processEvent("dblclick",a)},onMouseUp:function(a){this.processEvent("mouseup",a)},onMouseDown:function(a){this.processEvent("mousedown",a)},onMouseOver:function(a){this.processEvent("mouseover",a)},onMouseOut:function(a){this.processEvent("mouseout",a)},onMouseMove:function(a){this.fireEvent("mousemove",a)},onMouseEnter:Ext.emptyFn,onMouseLeave:Ext.emptyFn,addGradient:Ext.emptyFn,add:function(){var b=Array.prototype.slice.call(arguments),e,j=b.length>1,a,d,c,h,g;if(j||Ext.isArray(b[0])){a=j?b:b[0];d=[];for(c=0,h=a.length;c<h;c++){g=a[c];g=this.add(g);d.push(g)}return d}e=this.prepareItems(b[0],true)[0];this.insertByZIndex(e);this.onAdd(e);return e},insertByZIndex:function(j){var g=this,d=g.items.items,c=d.length,k=Math.ceil,h=j.attr.zIndex,i=c,b=i-1,e=0,a;if(g.orderSpritesByZIndex&&c&&h<d[b].attr.zIndex){while(e<=b){i=k((e+b)/2);a=d[i].attr.zIndex;if(a>h){b=i-1}else{if(a<h){e=i+1}else{break}}}while(i<c&&d[i].attr.zIndex<=h){i++}}g.items.insert(i,j);return i},onAdd:function(d){var g=d.group,b=d.draggable,a,e,c;if(g){a=[].concat(g);e=a.length;for(c=0;c<e;c++){g=a[c];this.getGroup(g).add(d)}delete d.group}if(b){d.initDraggable()}},remove:function(b,e){if(b){this.items.remove(b);var a=[].concat(this.groups.items),d=a.length,c;for(c=0;c<d;c++){a[c].remove(b)}b.onRemove();if(e===true){b.destroy()}}},removeAll:function(d){var a=this.items.items,c=a.length,b;for(b=c-1;b>-1;b--){this.remove(a[b],d)}},onRemove:Ext.emptyFn,onDestroy:Ext.emptyFn,applyViewBox:function(){var d=this,l=d.viewBox,a=d.width||1,h=d.height||1,g,e,j,b,i,c,k;if(l&&(a||h)){g=l.x;e=l.y;j=l.width;b=l.height;i=h/b;c=a/j;k=Math.min(c,i);if(j*k<a){g-=(a-j*k)/2/k}if(b*k<h){e-=(h-b*k)/2/k}d.viewBoxShift={dx:-g,dy:-e,scale:k};if(d.background){d.background.setAttributes(Ext.apply({},{x:g,y:e,width:a/k,height:h/k},{hidden:false}),true)}}else{if(d.background&&a&&h){d.background.setAttributes(Ext.apply({x:0,y:0,width:a,height:h},{hidden:false}),true)}}},getBBox:function(a,b){var c=this["getPath"+a.type](a);if(b){a.bbox.plain=a.bbox.plain||Ext.draw.Draw.pathDimensions(c);return a.bbox.plain}if(a.dirtyTransform){this.applyTransformations(a,true)}a.bbox.transform=a.bbox.transform||Ext.draw.Draw.pathDimensions(Ext.draw.Draw.mapPath(c,a.matrix));return a.bbox.transform},transformToViewBox:function(a,d){if(this.viewBoxShift){var c=this,b=c.viewBoxShift;return[a/b.scale-b.dx,d/b.scale-b.dy]}else{return[a,d]}},applyTransformations:function(b,d){if(b.type=="text"){b.bbox.transform=0;this.transform(b,false)}b.dirtyTransform=false;var c=this,a=b.attr;if(a.translation.x!=null||a.translation.y!=null){c.translate(b)}if(a.scaling.x!=null||a.scaling.y!=null){c.scale(b)}if(a.rotation.degrees!=null){c.rotate(b)}b.bbox.transform=0;this.transform(b,d);b.transformations=[]},rotate:function(a){var e,b=a.attr.rotation.degrees,d=a.attr.rotation.x,c=a.attr.rotation.y;if(!Ext.isNumber(d)||!Ext.isNumber(c)){e=this.getBBox(a,true);d=!Ext.isNumber(d)?e.x+e.width/2:d;c=!Ext.isNumber(c)?e.y+e.height/2:c}a.transformations.push({type:"rotate",degrees:b,x:d,y:c})},translate:function(b){var a=b.attr.translation.x||0,c=b.attr.translation.y||0;b.transformations.push({type:"translate",x:a,y:c})},scale:function(b){var e,a=b.attr.scaling.x||1,g=b.attr.scaling.y||1,d=b.attr.scaling.centerX,c=b.attr.scaling.centerY;if(!Ext.isNumber(d)||!Ext.isNumber(c)){e=this.getBBox(b,true);d=!Ext.isNumber(d)?e.x+e.width/2:d;c=!Ext.isNumber(c)?e.y+e.height/2:c}b.transformations.push({type:"scale",x:a,y:g,centerX:d,centerY:c})},rectPath:function(a,e,b,c,d){if(d){return[["M",a+d,e],["l",b-d*2,0],["a",d,d,0,0,1,d,d],["l",0,c-d*2],["a",d,d,0,0,1,-d,d],["l",d*2-b,0],["a",d,d,0,0,1,-d,-d],["l",0,d*2-c],["a",d,d,0,0,1,d,-d],["z"]]}return[["M",a,e],["l",b,0],["l",0,c],["l",-b,0],["z"]]},ellipsePath:function(a,d,c,b){if(b==null){b=c}return[["M",a,d],["m",0,-b],["a",c,b,0,1,1,0,2*b],["a",c,b,0,1,1,0,-2*b],["z"]]},getPathpath:function(a){return a.attr.path},getPathcircle:function(c){var b=c.attr;return this.ellipsePath(b.x,b.y,b.radius,b.radius)},getPathellipse:function(c){var b=c.attr;return this.ellipsePath(b.x,b.y,b.radiusX||(b.width/2)||0,b.radiusY||(b.height/2)||0)},getPathrect:function(c){var b=c.attr;return this.rectPath(b.x||0,b.y||0,b.width||0,b.height||0,b.r||0)},getPathimage:function(c){var b=c.attr;return this.rectPath(b.x||0,b.y||0,b.width,b.height)},getPathtext:function(a){var b=this.getBBoxText(a);return this.rectPath(b.x,b.y,b.width,b.height)},createGroup:function(b){var a=this.groups.get(b);if(!a){a=new Ext.draw.CompositeSprite({surface:this});a.id=b||Ext.id(null,"ext-surface-group-");this.groups.add(a)}return a},getGroup:function(b){var a;if(typeof b=="string"){a=this.groups.get(b);if(!a){a=this.createGroup(b)}}else{a=b}return a},prepareItems:function(a,c){a=[].concat(a);var e,b,d;for(b=0,d=a.length;b<d;b++){e=a[b];if(!(e instanceof Ext.draw.Sprite)){e.surface=this;a[b]=this.createItem(e)}else{e.surface=this}}return a},setText:Ext.emptyFn,createItem:Ext.emptyFn,getId:function(){return this.id||(this.id=Ext.id(null,"ext-surface-"))},destroy:function(){var a=this;delete a.domRef;if(a.background){a.background.destroy()}a.removeAll(true);Ext.destroy(a.groups.items)}});Ext.define("Ext.layout.component.Draw",{alias:"layout.draw",extend:Ext.layout.component.Auto,setHeightInDom:true,setWidthInDom:true,type:"draw",measureContentWidth:function(b){var c=b.target,a=b.getPaddingInfo(),d=this.getBBox(b);if(!c.viewBox){if(c.autoSize){return d.width+a.width}else{return d.x+d.width+a.width}}else{if(b.heightModel.shrinkWrap){return a.width}else{return d.width/d.height*(b.getProp("contentHeight")-a.height)+a.width}}},measureContentHeight:function(b){var c=b.target,a=b.getPaddingInfo(),d=this.getBBox(b);if(!b.target.viewBox){if(c.autoSize){return d.height+a.height}else{return d.y+d.height+a.height}}else{if(b.widthModel.shrinkWrap){return a.height}else{return d.height/d.width*(b.getProp("contentWidth")-a.width)+a.height}}},getBBox:function(a){var b=a.surfaceBBox;if(!b){b=a.target.surface.items.getBBox();if(b.width===-Infinity&&b.height===-Infinity){b.width=b.height=b.x=b.y=0}a.surfaceBBox=b}return b},publishInnerWidth:function(b,a){b.setContentWidth(a-b.getFrameInfo().width,true)},publishInnerHeight:function(b,a){b.setContentHeight(a-b.getFrameInfo().height,true)},finishedLayout:function(c){var b=c.props,a=c.getPaddingInfo();this.owner.setSurfaceSize(b.contentWidth-a.width,b.contentHeight-a.height);this.callParent(arguments)}});Ext.define("Ext.draw.Component",{alias:"widget.draw",extend:Ext.Component,enginePriority:["Svg","Vml"],baseCls:Ext.baseCSSPrefix+"surface",componentLayout:"draw",viewBox:true,shrinkWrap:3,autoSize:false,initComponent:function(){this.callParent(arguments);this.addEvents("mousedown","mouseup","mousemove","mouseenter","mouseleave","click","dblclick")},onRender:function(){var d=this,j=d.viewBox,b=d.autoSize,h,c,a,i,g,e;d.callParent(arguments);if(d.createSurface()!==false){c=d.surface.items;if(j||b){h=c.getBBox();a=h.width;i=h.height;g=h.x;e=h.y;if(d.viewBox){d.surface.setViewBox(g,e,a,i)}else{d.autoSizeSurface()}}}},autoSizeSurface:function(){var a=this.surface.items.getBBox();this.setSurfaceSize(a.width,a.height)},setSurfaceSize:function(b,a){this.surface.setSize(b,a);if(this.autoSize){var c=this.surface.items.getBBox();this.surface.setViewBox(c.x,c.y-(+Ext.isOpera),b,a)}},createSurface:function(){var d=this,b=Ext.applyIf({renderTo:d.el,height:d.height,width:d.width,items:d.items},d.initialConfig),a;delete b.listeners;if(!b.gradients){b.gradients=d.gradients}a=Ext.draw.Surface.create(b,d.enginePriority);if(!a){return false}d.surface=a;function c(e){return function(g){d.fireEvent(e,g)}}a.on({scope:d,mouseup:c("mouseup"),mousedown:c("mousedown"),mousemove:c("mousemove"),mouseenter:c("mouseenter"),mouseleave:c("mouseleave"),click:c("click"),dblclick:c("dblclick")})},onDestroy:function(){Ext.destroy(this.surface);this.callParent(arguments)}});Ext.chart=Ext.chart||{};Ext.define("Ext.chart.theme.Theme",(function(){(function(){Ext.chart.theme=function(c,b){c=c||{};var m=0,p=+new Date(),j,a,k,r,s,g,o,q,n=[],e,h;if(c.baseColor){e=Ext.draw.Color.fromString(c.baseColor);h=e.getHSL()[2];if(h<0.15){e=e.getLighter(0.3)}else{if(h<0.3){e=e.getLighter(0.15)}else{if(h>0.85){e=e.getDarker(0.3)}else{if(h>0.7){e=e.getDarker(0.15)}}}}c.colors=[e.getDarker(0.3).toString(),e.getDarker(0.15).toString(),e.toString(),e.getLighter(0.15).toString(),e.getLighter(0.3).toString()];delete c.baseColor}if(c.colors){a=c.colors.slice();s=b.markerThemes;r=b.seriesThemes;j=a.length;b.colors=a;for(;m<j;m++){k=a[m];o=s[m]||{};g=r[m]||{};o.fill=g.fill=o.stroke=g.stroke=k;s[m]=o;r[m]=g}b.markerThemes=s.slice(0,j);b.seriesThemes=r.slice(0,j)}for(q in b){if(q in c){if(Ext.isObject(c[q])&&Ext.isObject(b[q])){Ext.apply(b[q],c[q])}else{b[q]=c[q]}}}if(c.useGradients){a=b.colors||(function(){var d=[];for(m=0,r=b.seriesThemes,j=r.length;m<j;m++){d.push(r[m].fill||r[m].stroke)}return d}());for(m=0,j=a.length;m<j;m++){e=Ext.draw.Color.fromString(a[m]);if(e){k=e.getDarker(0.1).toString();e=e.toString();q="theme-"+e.substr(1)+"-"+k.substr(1)+"-"+p;n.push({id:q,angle:45,stops:{0:{color:e.toString()},100:{color:k.toString()}}});a[m]="url(#"+q+")"}}b.gradients=n;b.colors=a}Ext.apply(this,b)}}());return{theme:"Base",themeAttrs:false,initTheme:function(e){var d=this,b=Ext.chart.theme,c,a;if(e){e=e.split(":");for(c in b){if(c==e[0]){a=e[1]=="gradients";d.themeAttrs=new b[c]({useGradients:a});if(a){d.gradients=d.themeAttrs.gradients}if(d.themeAttrs.background){d.background=d.themeAttrs.background}return}}}}}})());Ext.define("Ext.chart.MaskLayer",{extend:Ext.Component,constructor:function(a){a=Ext.apply(a||{},{style:"position:absolute;background-color:#ff9;cursor:crosshair;opacity:0.5;border:1px solid #00f;"});this.callParent([a])},initComponent:function(){var a=this;a.callParent(arguments);a.addEvents("mousedown","mouseup","mousemove","mouseenter","mouseleave")},initDraggable:function(){this.callParent(arguments);this.dd.onStart=function(c){var b=this,a=b.comp;this.startPosition=a.getPosition(true);if(a.ghost&&!a.liveDrag){b.proxy=a.ghost();b.dragTarget=b.proxy.header.el}if(b.constrain||b.constrainDelegate){b.constrainTo=b.calculateConstrainRegion()}}}});Ext.define("Ext.chart.Mask",{constructor:function(a){var b=this;b.addEvents("select");if(a){Ext.apply(b,a)}if(b.enableMask){b.on("afterrender",function(){var c=new Ext.chart.MaskLayer({renderTo:b.el,hidden:true});c.el.on({mousemove:function(d){b.onMouseMove(d)},mouseup:function(d){b.onMouseUp(d)}});c.initDraggable();b.maskType=b.mask;b.mask=c;b.maskSprite=b.surface.add({type:"path",path:["M",0,0],zIndex:1001,opacity:0.6,hidden:true,stroke:"#00f",cursor:"crosshair"})},b,{single:true})}},onMouseUp:function(c){var a=this,d=a.bbox||a.chartBBox,b;a.maskMouseDown=false;a.mouseDown=false;if(a.mouseMoved){a.handleMouseEvent(c);a.mouseMoved=false;b=a.maskSelection;a.fireEvent("select",a,{x:b.x-d.x,y:b.y-d.y,width:b.width,height:b.height})}},onMouseDown:function(a){this.handleMouseEvent(a)},onMouseMove:function(a){this.handleMouseEvent(a)},handleMouseEvent:function(d){var h=this,s=h.maskType,o=h.bbox||h.chartBBox,l=o.x,j=o.y,k=Math,c=k.floor,r=k.abs,b=k.min,i=k.max,n=c(j+o.height),a=c(l+o.width),p=d.getPageX()-h.el.getX(),m=d.getPageY()-h.el.getY(),g=h.maskMouseDown,q;p=i(p,l);m=i(m,j);p=b(p,a);m=b(m,n);if(d.type==="mousedown"){h.mouseDown=true;h.mouseMoved=false;h.maskMouseDown={x:p,y:m}}else{h.mouseMoved=h.mouseDown;if(g&&h.mouseDown){if(s=="horizontal"){m=j;g.y=n}else{if(s=="vertical"){p=l;g.x=a}}a=g.x-p;n=g.y-m;q=["M",p,m,"l",a,0,0,n,-a,0,"z"];h.maskSelection={x:(a>0?p:p+a)+h.el.getX(),y:(n>0?m:m+n)+h.el.getY(),width:r(a),height:r(n)};h.mask.updateBox(h.maskSelection);h.mask.show();h.maskSprite.setAttributes({hidden:true},true)}else{if(s=="horizontal"){q=["M",p,j,"L",p,n]}else{if(s=="vertical"){q=["M",l,m,"L",a,m]}else{q=["M",p,j,"L",p,n,"M",l,m,"L",a,m]}}h.maskSprite.setAttributes({path:q,"stroke-width":s===true?1:1,hidden:false},true)}}},onMouseLeave:function(b){var a=this;a.mouseMoved=false;a.mouseDown=false;a.maskMouseDown=false;a.mask.hide();a.maskSprite.hide(true)}});Ext.define("Ext.chart.Navigation",{setZoom:function(p){var t=this,o=t.axes.items,r,m,c,a=t.chartBBox,u=a.width,d=a.height,g={x:p.x-t.el.getX(),y:p.y-t.el.getY(),width:p.width,height:p.height},j,n,q,b,h,l,k,e,s;for(r=0,m=o.length;r<m;r++){c=o[r];s=(c.position=="bottom"||c.position=="top");if(c.type=="Category"){if(!h){h=t.getChartStore();l=h.data.items.length}j=g;e=c.length;k=Math.round(e/l);if(s){q=(j.x?Math.floor(j.x/k)+1:0);b=(j.x+j.width)/k}else{q=(j.y?Math.floor(j.y/k)+1:0);b=(j.y+j.height)/k}}else{j={x:g.x/u,y:g.y/d,width:g.width/u,height:g.height/d};n=c.calcEnds();if(s){q=(n.to-n.from)*j.x+n.from;b=(n.to-n.from)*j.width+q}else{b=(n.to-n.from)*(1-j.y)+n.from;q=b-(n.to-n.from)*j.height}}c.minimum=q;c.maximum=b;if(s){if(c.doConstrain&&t.maskType!="vertical"){c.doConstrain()}}else{if(c.doConstrain&&t.maskType!="horizontal"){c.doConstrain()}}}t.redraw(false)},restoreZoom:function(){var e=this,b=e.axes.items,a,d,c;e.setSubStore(null);for(a=0,d=b.length;a<d;a++){c=b[a];delete c.minimum;delete c.maximum}e.redraw(false)}});Ext.define("Ext.chart.Shape",{singleton:true,circle:function(a,b){return a.add(Ext.apply({type:"circle",x:b.x,y:b.y,stroke:null,radius:b.radius},b))},line:function(a,b){return a.add(Ext.apply({type:"rect",x:b.x-b.radius,y:b.y-b.radius,height:2*b.radius,width:2*b.radius/5},b))},square:function(a,b){return a.add(Ext.applyIf({type:"rect",x:b.x-b.radius,y:b.y-b.radius,height:2*b.radius,width:2*b.radius,radius:null},b))},triangle:function(a,b){b.radius*=1.75;return a.add(Ext.apply({type:"path",stroke:null,path:"M".concat(b.x,",",b.y,"m0-",b.radius*0.58,"l",b.radius*0.5,",",b.radius*0.87,"-",b.radius,",0z")},b))},diamond:function(a,c){var b=c.radius;b*=1.5;return a.add(Ext.apply({type:"path",stroke:null,path:["M",c.x,c.y-b,"l",b,b,-b,b,-b,-b,b,-b,"z"]},c))},cross:function(a,c){var b=c.radius;b=b/1.7;return a.add(Ext.apply({type:"path",stroke:null,path:"M".concat(c.x-b,",",c.y,"l",[-b,-b,b,-b,b,b,b,-b,b,b,-b,b,b,b,-b,b,-b,-b,-b,b,-b,-b,"z"])},c))},plus:function(a,c){var b=c.radius/1.3;return a.add(Ext.apply({type:"path",stroke:null,path:"M".concat(c.x-b/2,",",c.y-b/2,"l",[0,-b,b,0,0,b,b,0,0,b,-b,0,0,b,-b,0,0,-b,-b,0,0,-b,"z"])},c))},arrow:function(a,c){var b=c.radius;return a.add(Ext.apply({type:"path",path:"M".concat(c.x-b*0.7,",",c.y-b*0.4,"l",[b*0.6,0,0,-b*0.4,b,b*0.8,-b,b*0.8,0,-b*0.4,-b*0.6,0],"z")},c))},drop:function(b,a,g,e,c,d){c=c||30;d=d||0;b.add({type:"path",path:["M",a,g,"l",c,0,"A",c*0.4,c*0.4,0,1,0,a+c*0.7,g-c*0.7,"z"],fill:"#000",stroke:"none",rotate:{degrees:22.5-d,x:a,y:g}});d=(d+90)*Math.PI/180;b.add({type:"text",x:a+c*Math.sin(d)-10,y:g+c*Math.cos(d)+5,text:e,"font-size":c*12/40,stroke:"none",fill:"#fff"})}});Ext.define("Ext.chart.LegendItem",{extend:Ext.draw.CompositeSprite,hiddenSeries:false,label:undefined,mask:undefined,x:0,y:0,zIndex:500,boldRe:/bold\s\d{1,}.*/i,constructor:function(a){this.callParent(arguments);this.createLegend(a)},createLegend:function(b){var d=this,c=d.series,a=b.yFieldIndex;d.label=d.createLabel(b);d.createSeriesMarkers(b);d.setAttributes({hidden:false},true);d.mask=d.createMask(b);d.yFieldIndex=a;d.on("mouseover",d.onMouseOver,d);d.on("mouseout",d.onMouseOut,d);d.on("mousedown",d.onMouseDown,d);if(!c.visibleInLegend(a)){d.hiddenSeries=true;d.label.setAttributes({opacity:0.5},true)}d.updatePosition({x:0,y:0})},getLabelText:function(){var d=this,c=d.series,a=d.yFieldIndex;function b(e){var g=c[e];return(Ext.isArray(g)?g[a]:g)}return b("title")||b("yField")},createLabel:function(a){var c=this,b=c.legend;return c.add("label",c.surface.add({type:"text",x:20,y:0,zIndex:(c.zIndex||0)+2,fill:b.labelColor,font:b.labelFont,text:c.getLabelText(),style:{cursor:"pointer"}}))},createMask:function(b){var d=this,a=d.surface,c=d.legend,e;e=d.getBBox();return d.add("mask",a.add({type:"rect",x:e.x,y:e.y,width:e.width||20,height:e.height||20,zIndex:(d.zIndex||0)+1,fill:c.boxFill,style:{cursor:"pointer"}}))},createSeriesMarkers:function(c){var i=this,g=c.yFieldIndex,e=i.series,d=e.type,a=i.surface,h=i.zIndex;if(d==="line"||d==="scatter"){if(d==="line"){var j=Ext.apply(e.seriesStyle,e.style);i.drawLine(0.5,0.5,16.5,0.5,h,j,g)}if(e.showMarkers||d==="scatter"){var b=Ext.apply(e.markerStyle,e.markerConfig||{},{fill:e.getLegendColor(g)});i.drawMarker(8.5,0.5,h,b)}}else{i.drawFilledBox(12,12,h,g)}},drawLine:function(i,g,j,h,d,k,c){var e=this,a=e.surface,b=e.series;return e.add("line",a.add({type:"path",path:"M"+i+","+g+"L"+j+","+h,zIndex:(d||0)+2,"stroke-width":b.lineWidth,"stroke-linejoin":"round","stroke-dasharray":b.dash,stroke:k.stroke||b.getLegendColor(c)||"#000",style:{cursor:"pointer"}}))},drawMarker:function(b,h,g,e){var d=this,a=d.surface,c=d.series;return d.add("marker",Ext.chart.Shape[e.type](a,{fill:e.fill,x:b,y:h,zIndex:(g||0)+2,radius:e.radius||e.size,style:{cursor:"pointer"}}))},drawFilledBox:function(e,b,h,c){var g=this,a=g.surface,d=g.series;return g.add("box",a.add({type:"rect",zIndex:(h||0)+2,x:0,y:0,width:e,height:b,fill:d.getLegendColor(c),style:{cursor:"pointer"}}))},onMouseOver:function(){var a=this;a.label.setStyle({"font-weight":"bold"});a.mask.setStyle({cursor:"pointer"});a.series._index=a.yFieldIndex;a.series.highlightItem()},onMouseOut:function(){var b=this,a=b.legend,c=b.boldRe;b.label.setStyle({"font-weight":a.labelFont&&c.test(a.labelFont)?"bold":"normal"});b.series._index=b.yFieldIndex;b.series.unHighlightItem()},onMouseDown:function(){var b=this,a=b.yFieldIndex;if(!b.hiddenSeries){b.series.hideAll(a);b.label.setAttributes({opacity:0.5},true)}else{b.series.showAll(a);b.label.setAttributes({opacity:1},true)}b.hiddenSeries=!b.hiddenSeries;b.legend.chart.redraw()},updatePosition:function(c){var g=this,a=g.items,e=a.length,b=0,d;if(!c){c=g.legend}for(;b<e;b++){d=a[b];switch(d.type){case"text":d.setAttributes({x:20+c.x+g.x,y:c.y+g.y},true);break;case"rect":d.setAttributes({translate:{x:c.x+g.x,y:c.y+g.y-6}},true);break;default:d.setAttributes({translate:{x:c.x+g.x,y:c.y+g.y}},true)}}}});Ext.define("Ext.chart.Legend",{visible:true,update:true,position:"bottom",x:0,y:0,labelColor:"#000",labelFont:"12px Helvetica, sans-serif",boxStroke:"#000",boxStrokeWidth:1,boxFill:"#FFF",itemSpacing:10,padding:5,width:0,height:0,boxZIndex:100,constructor:function(a){var b=this;if(a){Ext.apply(b,a)}b.items=[];b.isVertical=("left|right|float".indexOf(b.position)!==-1);b.origX=b.x;b.origY=b.y},create:function(){var e=this,a=e.chart.series.items,c,d,b;e.createBox();if(e.rebuild!==false){e.createItems()}if(!e.created&&e.isDisplayed()){e.created=true;for(c=0,d=a.length;c<d;c++){b=a[c];b.on("titlechange",e.redraw,e)}}},redraw:function(){var a=this;a.create();a.updatePosition()},isDisplayed:function(){return this.visible&&this.chart.series.findIndex("showInLegend",true)!==-1},createItems:function(){var h=this,d=h.chart.series.items,g=h.items,e,c,l,a,k,b,m;h.removeItems();for(c=0,l=d.length;c<l;c++){b=d[c];if(b.showInLegend){e=[].concat(b.yField);for(a=0,k=e.length;a<k;a++){m=h.createLegendItem(b,a);g.push(m)}}}h.alignItems()},removeItems:function(){var d=this,b=d.items,a=b?b.length:0,c;if(a){for(c=0;c<a;c++){b[c].destroy()}}b.length=[]},alignItems:function(){var j=this,h=j.items,k=j.padding,d=2,b=j.isVertical,n=Math.floor,a=Math.max,e,m,l,c,g,i;e=j.updateItemDimensions();m=e.maxWidth,l=e.maxHeight,c=e.totalWidth,g=e.totalHeight,i=e.spacing;j.width=n((b?m:c)+k*2);if(b&&h.length===1){d=1}j.height=n((b?g-d*i:l)+(k*2));j.itemHeight=l},updateItemDimensions:function(){var s=this,j=s.items,g=s.padding,t=s.itemSpacing,p=0,k=0,d=0,r=0,b=s.isVertical,c=Math.floor,u=Math.max,e=0,o,n,q,a,m,h;for(o=0,n=j.length;o<n;o++){q=j[o];a=q.getBBox();m=a.width;h=a.height;if(o===0){e=b?g+h/2:g}else{e=t/(b?2:1)}q.x=c(b?g:d+e);q.y=c(b?r+e:g+h/2);d+=m+e;r+=h+e;p=u(p,m);k=u(k,h)}return{totalWidth:d,totalHeight:r,maxWidth:p,maxHeight:k,spacing:e}},createLegendItem:function(b,a){var c=this;return new Ext.chart.LegendItem({legend:c,series:b,surface:c.chart.surface,yFieldIndex:a})},getBBox:function(){var a=this;return{x:Math.round(a.x)-a.boxStrokeWidth/2,y:Math.round(a.y)-a.boxStrokeWidth/2,width:a.width,height:a.height}},createBox:function(){var b=this,a,c;if(b.boxSprite){b.boxSprite.destroy()}c=b.getBBox();if(isNaN(c.width)||isNaN(c.height)){b.boxSprite=false;return}a=b.boxSprite=b.chart.surface.add(Ext.apply({type:"rect",stroke:b.boxStroke,"stroke-width":b.boxStrokeWidth,fill:b.boxFill,zIndex:b.boxZIndex},c));a.redraw()},calcPosition:function(){var i=this,l,j,n=i.width,m=i.height,k=i.padding,h=i.chart,o=h.chartBBox,b=h.insetPadding,d=o.width-(b*2),c=o.height-(b*2),g=o.x+b,e=o.y+b,a=h.surface,p=Math.floor;switch(i.position){case"left":l=b;j=p(e+c/2-m/2);break;case"right":l=p(a.width-n)-b;j=p(e+c/2-m/2);break;case"top":l=p(g+d/2-n/2);j=b;break;case"bottom":l=p(g+d/2-n/2);j=p(a.height-m)-b;break;default:l=p(i.origX)+b;j=p(i.origY)+b}return{x:l,y:j}},updatePosition:function(){var d=this,b=d.items,g,c,a,e;if(d.isDisplayed()){g=d.calcPosition();d.x=g.x;d.y=g.y;for(c=0,a=b.length;c<a;c++){b[c].updatePosition()}e=d.getBBox();if(isNaN(e.width)||isNaN(e.height)){if(d.boxSprite){d.boxSprite.hide(true)}}else{if(!d.boxSprite){d.createBox()}d.boxSprite.setAttributes(e,true);d.boxSprite.show(true)}}},toggle:function(b){var e=this,d=0,c=e.items,a=c.length;if(e.boxSprite){if(b){e.boxSprite.show(true)}else{e.boxSprite.hide(true)}}for(;d<a;++d){if(b){c[d].show(true)}else{c[d].hide(true)}}e.visible=b}});Ext.define("Ext.chart.theme.Base",{constructor:function(a){var b=Ext.identityFn;Ext.chart.theme.call(this,a,{background:false,axis:{stroke:"#444","stroke-width":1},axisLabelTop:{fill:"#444",font:"12px Arial, Helvetica, sans-serif",spacing:2,padding:5,renderer:b},axisLabelRight:{fill:"#444",font:"12px Arial, Helvetica, sans-serif",spacing:2,padding:5,renderer:b},axisLabelBottom:{fill:"#444",font:"12px Arial, Helvetica, sans-serif",spacing:2,padding:5,renderer:b},axisLabelLeft:{fill:"#444",font:"12px Arial, Helvetica, sans-serif",spacing:2,padding:5,renderer:b},axisTitleTop:{font:"bold 18px Arial",fill:"#444"},axisTitleRight:{font:"bold 18px Arial",fill:"#444",rotate:{x:0,y:0,degrees:270}},axisTitleBottom:{font:"bold 18px Arial",fill:"#444"},axisTitleLeft:{font:"bold 18px Arial",fill:"#444",rotate:{x:0,y:0,degrees:270}},series:{"stroke-width":0},seriesLabel:{font:"12px Arial",fill:"#333"},marker:{stroke:"#555",radius:3,size:3},colors:["#94ae0a","#115fa6","#a61120","#ff8809","#ffd13e","#a61187","#24ad9a","#7c7474","#a66111"],seriesThemes:[{fill:"#115fa6"},{fill:"#94ae0a"},{fill:"#a61120"},{fill:"#ff8809"},{fill:"#ffd13e"},{fill:"#a61187"},{fill:"#24ad9a"},{fill:"#7c7474"},{fill:"#115fa6"},{fill:"#94ae0a"},{fill:"#a61120"},{fill:"#ff8809"},{fill:"#ffd13e"},{fill:"#a61187"},{fill:"#24ad9a"},{fill:"#7c7474"},{fill:"#a66111"}],markerThemes:[{fill:"#115fa6",type:"circle"},{fill:"#94ae0a",type:"cross"},{fill:"#115fa6",type:"plus"},{fill:"#94ae0a",type:"circle"},{fill:"#a61120",type:"cross"}]})}},function(){var c=["#b1da5a","#4ce0e7","#e84b67","#da5abd","#4d7fe6","#fec935"],k=["Green","Sky","Red","Purple","Blue","Yellow"],h=0,g=0,b=c.length,a=Ext.chart.theme,d=[["#f0a50a","#c20024","#2044ba","#810065","#7eae29"],["#6d9824","#87146e","#2a9196","#d39006","#1e40ac"],["#fbbc29","#ce2e4e","#7e0062","#158b90","#57880e"],["#ef5773","#fcbd2a","#4f770d","#1d3eaa","#9b001f"],["#7eae29","#fdbe2a","#910019","#27b4bc","#d74dbc"],["#44dce1","#0b2592","#996e05","#7fb325","#b821a1"]],e=d.length;for(;h<b;h++){a[k[h]]=(function(i){return Ext.extend(a.Base,{constructor:function(j){a.Base.prototype.constructor.call(this,Ext.apply({baseColor:i},j))}})}(c[h]))}for(h=0;h<e;h++){a["Category"+(h+1)]=(function(i){return Ext.extend(a.Base,{constructor:function(j){a.Base.prototype.constructor.call(this,Ext.apply({colors:i},j))}})}(d[h]))}});Ext.define("Ext.chart.Chart",{alias:"widget.chart",extend:Ext.draw.Component,mixins:{themeManager:Ext.chart.theme.Theme,mask:Ext.chart.Mask,navigation:Ext.chart.Navigation,bindable:Ext.util.Bindable,observable:Ext.util.Observable},viewBox:false,animate:false,legend:false,insetPadding:10,background:false,constructor:function(b){var c=this,a;b=Ext.apply({},b);c.initTheme(b.theme||c.theme);if(c.gradients){Ext.apply(b,{gradients:c.gradients})}if(c.background){Ext.apply(b,{background:c.background})}if(b.animate){a={easing:"ease",duration:500};if(Ext.isObject(b.animate)){b.animate=Ext.applyIf(b.animate,a)}else{b.animate=a}}c.mixins.observable.constructor.call(c,b);if(b.enableMask){c.mixins.mask.constructor.call(c)}c.mixins.navigation.constructor.call(c);c.callParent([b])},getChartStore:function(){return this.substore||this.store},initComponent:function(){var b=this,c,a;b.callParent();b.addEvents("itemmousedown","itemmouseup","itemmouseover","itemmouseout","itemclick","itemdblclick","itemdragstart","itemdrag","itemdragend","beforerefresh","refresh");Ext.applyIf(b,{zoom:{width:1,height:1,x:0,y:0}});b.maxGutters={left:0,right:0,bottom:0,top:0};b.store=Ext.data.StoreManager.lookup(b.store);c=b.axes;b.axes=new Ext.util.MixedCollection(false,function(d){return d.position});if(c){b.axes.addAll(c)}a=b.series;b.series=new Ext.util.MixedCollection(false,function(d){return d.seriesId||(d.seriesId=Ext.id(null,"ext-chart-series-"))});if(a){b.series.addAll(a)}if(b.legend!==false){b.legend=new Ext.chart.Legend(Ext.applyIf({chart:b},b.legend))}b.on({mousemove:b.onMouseMove,mouseleave:b.onMouseLeave,mousedown:b.onMouseDown,mouseup:b.onMouseUp,click:b.onClick,dblclick:b.onDblClick,scope:b})},afterComponentLayout:function(c,a,b,e){var d=this;if(Ext.isNumber(c)&&Ext.isNumber(a)){if(c!==b||a!==e){d.curWidth=c;d.curHeight=a;d.redraw(true);d.needsRedraw=false}else{if(d.needsRedraw){d.redraw();d.needsRedraw=false}}}this.callParent(arguments)},redraw:function(c){var k=this,j=k.series.items,g=j.length,b=k.axes.items,d=b.length,a=0,h,n,m=k.chartBBox={x:0,y:0,height:k.curHeight,width:k.curWidth},l=k.legend,e;k.surface.setSize(m.width,m.height);for(h=0;h<g;h++){n=j[h];if(!n.initialized){e=k.initializeSeries(n,h,a)}else{e=n}e.onRedraw();if(Ext.isArray(n.yField)){a+=n.yField.length}else{++a}}for(h=0;h<d;h++){n=b[h];if(!n.initialized){k.initializeAxis(n)}}for(h=0;h<d;h++){b[h].processView()}for(h=0;h<d;h++){b[h].drawAxis(true)}if(l!==false&&l.visible){if(l.update||!l.created){l.create()}}k.alignAxes();if(l!==false&&l.visible){l.updatePosition()}k.getMaxGutters();k.resizing=!!c;for(h=0;h<d;h++){b[h].drawAxis()}for(h=0;h<g;h++){k.drawCharts(j[h])}k.resizing=false},afterRender:function(){var a=this;a.callParent(arguments);if(a.categoryNames){a.setCategoryNames(a.categoryNames)}a.bindStore(a.store,true);a.refresh();if(a.surface.engine==="Vml"){a.on("added",a.onAddedVml,a);a.mon(a.hierarchyEventSource,"added",a.onContainerAddedVml,a)}},onAddedVml:function(){this.needsRedraw=true},onContainerAddedVml:function(a){if(this.isDescendantOf(a)){this.needsRedraw=true}},getEventXY:function(d){var c=this,b=this.surface.getRegion(),h=d.getXY(),a=h[0]-b.left,g=h[1]-b.top;return[a,g]},onClick:function(a){this.handleClick("itemclick",a)},onDblClick:function(a){this.handleClick("itemdblclick",a)},handleClick:function(a,h){var k=this,g=k.getEventXY(h),d=k.series.items,b,j,c,l;for(b=0,j=d.length;b<j;b++){c=d[b];if(Ext.draw.Draw.withinBox(g[0],g[1],c.bbox)){if(c.getItemForPoint){l=c.getItemForPoint(g[0],g[1]);if(l){c.fireEvent(a,l)}}}}},onMouseDown:function(k){var j=this,a=j.getEventXY(k),b=j.series.items,d,h,c,g;if(j.enableMask){j.mixins.mask.onMouseDown.call(j,k)}for(d=0,h=b.length;d<h;d++){c=b[d];if(Ext.draw.Draw.withinBox(a[0],a[1],c.bbox)){if(c.getItemForPoint){g=c.getItemForPoint(a[0],a[1]);if(g){c.fireEvent("itemmousedown",g)}}}}},onMouseUp:function(k){var j=this,a=j.getEventXY(k),b=j.series.items,d,h,c,g;if(j.enableMask){j.mixins.mask.onMouseUp.call(j,k)}for(d=0,h=b.length;d<h;d++){c=b[d];if(Ext.draw.Draw.withinBox(a[0],a[1],c.bbox)){if(c.getItemForPoint){g=c.getItemForPoint(a[0],a[1]);if(g){c.fireEvent("itemmouseup",g)}}}}},onMouseMove:function(h){var k=this,d=k.getEventXY(h),c=k.series.items,a,j,b,n,l,g,m;if(k.enableMask){k.mixins.mask.onMouseMove.call(k,h)}for(a=0,j=c.length;a<j;a++){b=c[a];if(Ext.draw.Draw.withinBox(d[0],d[1],b.bbox)){if(b.getItemForPoint){n=b.getItemForPoint(d[0],d[1]);l=b._lastItemForPoint;g=b._lastStoreItem;m=b._lastStoreField;if(n!==l||n&&(n.storeItem!=g||n.storeField!=m)){if(l){b.fireEvent("itemmouseout",l);delete b._lastItemForPoint;delete b._lastStoreField;delete b._lastStoreItem}if(n){b.fireEvent("itemmouseover",n);b._lastItemForPoint=n;b._lastStoreItem=n.storeItem;b._lastStoreField=n.storeField}}}}else{l=b._lastItemForPoint;if(l){b.fireEvent("itemmouseout",l);delete b._lastItemForPoint;delete b._lastStoreField;delete b._lastStoreItem}}}},onMouseLeave:function(h){var g=this,a=g.series.items,c,d,b;if(g.enableMask){g.mixins.mask.onMouseLeave.call(g,h)}for(c=0,d=a.length;c<d;c++){b=a[c];delete b._lastItemForPoint}},delayRefresh:function(){var a=this;if(!a.refreshTask){a.refreshTask=new Ext.util.DelayedTask(a.refresh,a)}a.refreshTask.delay(a.refreshBuffer)},refresh:function(){var a=this;if(a.rendered&&a.curWidth!==undefined&&a.curHeight!==undefined){if(!a.isVisible(true)){if(!a.refreshPending){a.setShowListeners("mon");a.refreshPending=true}return}if(a.fireEvent("beforerefresh",a)!==false){a.redraw();a.fireEvent("refresh",a)}}},onShow:function(){var a=this;a.callParent(arguments);if(a.refreshPending){a.delayRefresh();a.setShowListeners("mun")}delete a.refreshPending},setShowListeners:function(b){var a=this;a[b](a.hierarchyEventSource,{scope:a,single:true,show:a.forceRefresh,expand:a.forceRefresh})},doRefresh:function(){this.setSubStore(null);this.refresh()},forceRefresh:function(a){var b=this;if(b.isDescendantOf(a)&&b.refreshPending){b.setShowListeners("mun");b.delayRefresh()}delete b.refreshPending},bindStore:function(a,b){var c=this;c.mixins.bindable.bindStore.apply(c,arguments);if(c.store&&!b){c.refresh()}},getStoreListeners:function(){var b=this.doRefresh,a=this.delayRefresh;return{refresh:b,add:a,bulkremove:a,update:a,clear:b}},setSubStore:function(a){this.substore=a},initializeAxis:function(b){var e=this,k=e.chartBBox,j=k.width,d=k.height,i=k.x,g=k.y,c=e.themeAttrs,a={chart:e};if(c){a.axisStyle=Ext.apply({},c.axis);a.axisLabelLeftStyle=Ext.apply({},c.axisLabelLeft);a.axisLabelRightStyle=Ext.apply({},c.axisLabelRight);a.axisLabelTopStyle=Ext.apply({},c.axisLabelTop);a.axisLabelBottomStyle=Ext.apply({},c.axisLabelBottom);a.axisTitleLeftStyle=Ext.apply({},c.axisTitleLeft);a.axisTitleRightStyle=Ext.apply({},c.axisTitleRight);a.axisTitleTopStyle=Ext.apply({},c.axisTitleTop);a.axisTitleBottomStyle=Ext.apply({},c.axisTitleBottom)}switch(b.position){case"top":Ext.apply(a,{length:j,width:d,x:i,y:g});break;case"bottom":Ext.apply(a,{length:j,width:d,x:i,y:d});break;case"left":Ext.apply(a,{length:d,width:j,x:i,y:d});break;case"right":Ext.apply(a,{length:d,width:j,x:j,y:d});break}if(!b.chart){Ext.apply(a,b);b=e.axes.replace(Ext.createByAlias("axis."+b.type.toLowerCase(),a))}else{Ext.apply(b,a)}b.initialized=true},getInsets:function(){var b=this,a=b.insetPadding;return{top:a,right:a,bottom:a,left:a}},calculateInsets:function(){var k=this,n=k.legend,j=k.axes,g=["top","right","bottom","left"],d,h,e,a,m,c,o;function b(p){var l=j.findIndex("position",p);return(l<0)?null:j.getAt(l)}d=k.getInsets();for(h=0,e=g.length;h<e;h++){a=g[h];m=(a==="left"||a==="right");c=b(a);if(n!==false){if(n.position===a){o=n.getBBox();d[a]+=(m?o.width:o.height)+k.insetPadding}}if(c&&c.bbox){o=c.bbox;d[a]+=(m?o.width:o.height)}}return d},alignAxes:function(){var g=this,a=g.axes.items,c,k,e,d,b,h,j;c=g.calculateInsets();k={x:c.left,y:c.top,width:g.curWidth-c.left-c.right,height:g.curHeight-c.top-c.bottom};g.chartBBox=k;for(e=0,d=a.length;e<d;e++){b=a[e];h=b.position;j=h==="left"||h==="right";b.x=(h==="right"?k.x+k.width:k.x);b.y=(h==="top"?k.y:k.y+k.height);b.width=(j?k.width:k.height);b.length=(j?k.height:k.width)}},initializeSeries:function(k,n,a){var m=this,g=m.themeAttrs,e,h,p,r,q,o=[],c=(k instanceof Ext.chart.series.Series),j=0,d,b;if(!c){b={chart:m,seriesId:k.seriesId};if(g){p=g.seriesThemes;q=g.markerThemes;e=Ext.apply({},g.series);h=Ext.apply({},g.marker);b.seriesStyle=Ext.apply(e,p[a%p.length]);b.seriesLabelStyle=Ext.apply({},g.seriesLabel);b.markerStyle=Ext.apply(h,q[a%q.length]);if(g.colors){b.colorArrayStyle=g.colors}else{o=[];for(d=p.length;j<d;j++){r=p[j];if(r.fill||r.stroke){o.push(r.fill||r.stroke)}}if(o.length){b.colorArrayStyle=o}}b.seriesIdx=n;b.themeIdx=a}Ext.applyIf(b,k);k=m.series.replace(Ext.createByAlias("series."+k.type.toLowerCase(),b))}if(k.initialize){k.initialize()}k.initialized=true;return k},getMaxGutters:function(){var j=this,e=j.series.items,b,h,c,k,g=0,a=0,l=0,d=0;for(b=0,h=e.length;b<h;b++){k=e[b].getGutters();if(k){if(k.verticalAxis){l=Math.max(l,k.lower);d=Math.max(d,k.upper)}else{g=Math.max(g,k.lower);a=Math.max(a,k.upper)}}}j.maxGutters={left:g,right:a,bottom:l,top:d}},drawAxis:function(a){a.drawAxis()},drawCharts:function(a){a.triggerafterrender=false;a.drawSeries();if(!this.animate){a.fireEvent("afterrender")}},save:function(a){return Ext.draw.Surface.save(this.surface,a)},destroy:function(){Ext.destroy(this.surface);this.bindStore(null);this.callParent(arguments)}});Ext.define("Ext.chart.Highlight",{highlight:false,highlightCfg:{fill:"#fdd","stroke-width":5,stroke:"#f55"},constructor:function(a){if(a.highlight&&(typeof a.highlight!=="boolean")){this.highlightCfg=Ext.merge({},this.highlightCfg,a.highlight)}},highlightItem:function(k){if(!k){return}var g=this,j=k.sprite,a=Ext.merge({},g.highlightCfg,g.highlight),d=g.chart.surface,c=g.chart.animate,b,i,h,e;if(!g.highlight||!j||j._highlighted){return}if(j._anim){j._anim.paused=true}j._highlighted=true;if(!j._defaults){j._defaults=Ext.apply({},j.attr);i={};h={};for(b in a){if(!(b in j._defaults)){j._defaults[b]=d.availableAttrs[b]}i[b]=j._defaults[b];h[b]=a[b];if(Ext.isObject(a[b])){i[b]={};h[b]={};Ext.apply(j._defaults[b],j.attr[b]);Ext.apply(i[b],j._defaults[b]);for(e in j._defaults[b]){if(!(e in a[b])){h[b][e]=i[b][e]}else{h[b][e]=a[b][e]}}for(e in a[b]){if(!(e in h[b])){h[b][e]=a[b][e]}}}}j._from=i;j._to=h;j._endStyle=h}if(c){j._anim=new Ext.fx.Anim({target:j,from:j._from,to:j._to,duration:150})}else{j.setAttributes(j._to,true)}},unHighlightItem:function(){if(!this.highlight||!this.items){return}var j=this,h=j.items,g=h.length,a=Ext.merge({},j.highlightCfg,j.highlight),c=j.chart.animate,e=0,d,b,k;for(;e<g;e++){if(!h[e]){continue}k=h[e].sprite;if(k&&k._highlighted){if(k._anim){k._anim.paused=true}d={};for(b in a){if(Ext.isObject(k._defaults[b])){d[b]=Ext.apply({},k._defaults[b])}else{d[b]=k._defaults[b]}}if(c){k._endStyle=d;k._anim=new Ext.fx.Anim({target:k,to:d,duration:150})}else{k.setAttributes(d,true)}delete k._highlighted}}},cleanHighlights:function(){if(!this.highlight){return}var d=this.group,c=this.markerGroup,b=0,a;for(a=d.getCount();b<a;b++){delete d.getAt(b)._defaults}if(c){for(a=c.getCount();b<a;b++){delete c.getAt(b)._defaults}}}});Ext.define("Ext.chart.Label",{colorStringRe:/url\s*\(\s*#([^\/)]+)\s*\)/,constructor:function(a){var b=this;b.label=Ext.applyIf(b.label||{},{display:"none",stackedDisplay:"none",color:"#000",field:"name",minMargin:50,font:"11px Helvetica, sans-serif",orientation:"horizontal",renderer:Ext.identityFn});if(b.label.display!=="none"){b.labelsGroup=b.chart.surface.getGroup(b.seriesId+"-labels")}},renderLabels:function(){var q=this,R=q.chart,A=R.gradients,t=q.items,M=R.animate,E=q.label,w=E.display,d=E.stackedDisplay,z=E.renderer,x=E.color,e=[].concat(E.field),s=q.labelsGroup,m=(s||0)&&s.length,b=q.chart.getChartStore(),r=b.getCount(),l=(t||0)&&t.length,H=l/r,D=(A||0)&&A.length,n=Ext.draw.Color,Q=[],p,P,J,c,C,O,L,g,h,v,y,K,S,u,U,G,F,a,B,T,I,o,N;if(w=="none"){return}if(l==0){while(m--){Q.push(m)}}else{for(P=0,J=0,c=0;P<r;P++){C=0;for(O=0;O<H;O++){y=t[J];K=s.getAt(c);S=b.getAt(P);while(this.__excludes&&this.__excludes[C]){C++}if(!y&&K){K.hide(true);c++}if(y&&e[O]){if(!K){K=q.onCreateLabel(S,y,P,w)}q.onPlaceLabel(K,S,y,P,w,M,C);c++;if(E.contrast&&y.sprite){u=y.sprite;if(M&&u._endStyle){a=u._endStyle.fill}else{if(M&&u._to){a=u._to.fill}else{a=u.attr.fill}}a=a||u.attr.fill;U=n.fromString(a);if(a&&!U){a=a.match(q.colorStringRe)[1];for(L=0;L<D;L++){p=A[L];if(p.id==a){v=0;g=0;for(h in p.stops){v++;g+=n.fromString(p.stops[h].color).getGrayscale()}G=(g/v)/255;break}}}else{G=U.getGrayscale()/255}if(K.isOutside){G=1}F=n.fromString(K.attr.color||K.attr.fill).getHSL();F[2]=G>0.5?0.2:0.8;K.setAttributes({fill:String(n.fromHSL.apply({},F))},true)}if(q.stacked&&d&&(y.totalPositiveValues||y.totalNegativeValues)){T=(y.totalPositiveValues||0);I=(y.totalNegativeValues||0);B=T+I;if(d=="total"){o=z(B)}else{if(d=="balances"){if(T==0&&I==0){o=z(0)}else{o=z(T);N=z(I)}}}if(o){K=s.getAt(c);if(!K){K=q.onCreateLabel(S,y,P,"over")}K.setAttributes({text:o});q.onPlaceLabel(K,S,y,P,"over",M,C);c++;F=n.fromString(K.attr.color||K.attr.fill).getHSL();K.setAttributes({fill:String(n.fromHSL.apply({},F))},true)}if(N){K=s.getAt(c);if(!K){K=q.onCreateLabel(S,y,P,"under")}K.setAttributes({text:N});q.onPlaceLabel(K,S,y,P,"under",M,C);c++;F=n.fromString(K.attr.color||K.attr.fill).getHSL();K.setAttributes({fill:String(n.fromHSL.apply({},F))},true)}}}J++;C++}}m=s.length;while(m>c){Q.push(c);c++}}q.hideLabels(Q)},hideLabels:function(b){var a=this.labelsGroup,c=!!b&&b.length;if(!a){return}if(c===false){c=a.getCount();while(c--){a.getAt(c).hide(true)}}else{while(c--){a.getAt(b[c]).hide(true)}}}});Ext.define("Ext.chart.TipSurface",{extend:Ext.draw.Component,spriteArray:false,renderFirst:true,constructor:function(a){this.callParent([a]);if(a.sprites){this.spriteArray=[].concat(a.sprites);delete a.sprites}},onRender:function(){var c=this,b=0,a=0,d,e;this.callParent(arguments);e=c.spriteArray;if(c.renderFirst&&e){c.renderFirst=false;for(a=e.length;b<a;b++){d=c.surface.add(e[b]);d.setAttributes({hidden:false},true)}}}});Ext.define("Ext.chart.Tip",{constructor:function(b){var c=this,a,d,e;if(b.tips){c.tipTimeout=null;c.tipConfig=Ext.apply({},b.tips,{renderer:Ext.emptyFn,constrainPosition:true,autoHide:true});c.tooltip=new Ext.tip.ToolTip(c.tipConfig);c.chart.surface.on("mousemove",c.tooltip.onMouseMove,c.tooltip);c.chart.surface.on("mouseleave",function(){c.hideTip()});if(c.tipConfig.surface){a=c.tipConfig.surface;d=a.sprites;e=new Ext.chart.TipSurface({id:"tipSurfaceComponent",sprites:d});if(a.width&&a.height){e.setSize(a.width,a.height)}c.tooltip.add(e);c.spriteTip=e}}},showTip:function(l){var e=this,m,a,c,d,k,b,j,h,i,g;if(!e.tooltip){return}clearTimeout(e.tipTimeout);m=e.tooltip;a=e.spriteTip;c=e.tipConfig;d=m.trackMouse;if(!d){m.trackMouse=true;k=l.sprite;b=k.surface;j=Ext.get(b.getId());if(j){h=j.getXY();i=h[0]+(k.attr.x||0)+(k.attr.translation&&k.attr.translation.x||0);g=h[1]+(k.attr.y||0)+(k.attr.translation&&k.attr.translation.y||0);m.targetXY=[i,g]}}if(a){c.renderer.call(m,l.storeItem,l,a.surface)}else{c.renderer.call(m,l.storeItem,l)}m.show();m.trackMouse=d},hideTip:function(a){var b=this.tooltip;if(!b){return}clearTimeout(this.tipTimeout);this.tipTimeout=setTimeout(function(){b.hide()},0)}});Ext.define("Ext.chart.axis.Abstract",{constructor:function(a){a=a||{};var b=this,c=a.position||"left";c=c.charAt(0).toUpperCase()+c.substring(1);a.label=Ext.apply(a["axisLabel"+c+"Style"]||{},a.label||{});a.axisTitleStyle=Ext.apply(a["axisTitle"+c+"Style"]||{},a.labelTitle||{});Ext.apply(b,a);b.fields=Ext.Array.from(b.fields);this.callParent();b.labels=[];b.getId();b.labelGroup=b.chart.surface.getGroup(b.axisId+"-labels")},alignment:null,grid:false,steps:10,x:0,y:0,minValue:0,maxValue:0,getId:function(){return this.axisId||(this.axisId=Ext.id(null,"ext-axis-"))},processView:Ext.emptyFn,drawAxis:Ext.emptyFn,addDisplayAndLabels:Ext.emptyFn});Ext.define("Ext.chart.axis.Axis",{extend:Ext.chart.axis.Abstract,alternateClassName:"Ext.chart.Axis",forceMinMax:false,dashSize:3,position:"bottom",skipFirst:false,length:0,width:0,adjustEnd:true,majorTickSteps:false,nullGutters:{lower:0,upper:0,verticalAxis:undefined},applyData:Ext.emptyFn,getRange:function(){var C=this,p=C.chart,l=p.getChartStore(),E=l.data.items,o=p.series.items,D=C.position,y,a=Ext.chart.series,u=[],t=Infinity,x=-Infinity,c=C.position==="left"||C.position==="right"||C.position==="radial",z,n,d,w,v,m=E.length,g,B={},s={},A=true,q,h,e,b,r;q=C.fields;for(w=0,n=q.length;w<n;w++){s[q[w]]=true}for(z=0,n=o.length;z<n;z++){if(o[z].seriesIsHidden){continue}if(!o[z].getAxesForXAndYFields){continue}y=o[z].getAxesForXAndYFields();if(y.xAxis&&y.xAxis!==D&&y.yAxis&&y.yAxis!==D){continue}if(a.Bar&&o[z] instanceof a.Bar&&!o[z].column){q=c?Ext.Array.from(o[z].xField):Ext.Array.from(o[z].yField)}else{q=c?Ext.Array.from(o[z].yField):Ext.Array.from(o[z].xField)}if(C.fields.length){for(w=0,d=q.length;w<d;w++){if(s[q[w]]){break}}if(w==d){continue}}if(g=o[z].stacked){if(a.Bar&&o[z] instanceof a.Bar){if(o[z].column!=c){g=false;A=false}}else{if(!c){g=false;A=false}}}if(g){h={};for(w=0;w<q.length;w++){if(A&&o[z].__excludes&&o[z].__excludes[w]){continue}if(!s[q[w]]){Ext.Logger.warn("Field `"+q[w]+"` is not included in the "+D+" axis config.")}s[q[w]]=h[q[w]]=true}u.push({fields:h,positiveValue:0,negativeValue:0})}else{if(!q||q.length==0){q=C.fields}for(w=0;w<q.length;w++){if(A&&o[z].__excludes&&o[z].__excludes[w]){continue}s[q[w]]=B[q[w]]=true}}}for(z=0;z<m;z++){e=E[z];for(v=0;v<u.length;v++){u[v].positiveValue=0;u[v].negativeValue=0}for(b in s){r=e.get(b);if(C.type=="Time"&&typeof r=="string"){r=Date.parse(r)}if(isNaN(r)){continue}if(r===undefined){r=0}if(B[b]){if(t>r){t=r}if(x<r){x=r}}for(v=0;v<u.length;v++){if(u[v].fields[b]){if(r>=0){u[v].positiveValue+=r;if(x<u[v].positiveValue){x=u[v].positiveValue}if(t>0){t=0}}else{u[v].negativeValue+=r;if(t>u[v].negativeValue){t=u[v].negativeValue}if(x<0){x=0}}}}}}if(!isFinite(x)){x=C.prevMax||0}if(!isFinite(t)){t=C.prevMin||0}if(typeof t==="number"){t=Ext.Number.correctFloat(t)}if(typeof x==="number"){x=Ext.Number.correctFloat(x)}if(t!=x&&(x!=Math.floor(x)||t!=Math.floor(t))){t=Math.floor(t);x=Math.floor(x)+1}if(!isNaN(C.minimum)){t=C.minimum}if(!isNaN(C.maximum)){x=C.maximum}if(t>=x){t=Math.floor(t);x=t+1}return{min:t,max:x}},calcEnds:function(){var h=this,d=h.getRange(),g=d.min,a=d.max,c,i,e,b;c=(Ext.isNumber(h.majorTickSteps)?h.majorTickSteps+1:h.steps);i=!(Ext.isNumber(h.maximum)&&Ext.isNumber(h.minimum)&&Ext.isNumber(h.majorTickSteps)&&h.majorTickSteps>0);e=Ext.draw.Draw.snapEnds(g,a,c,i);if(Ext.isNumber(h.maximum)){e.to=h.maximum;b=true}if(Ext.isNumber(h.minimum)){e.from=h.minimum;b=true}if(h.adjustMaximumByMajorUnit){e.to=Math.ceil(e.to/e.step)*e.step;b=true}if(h.adjustMinimumByMajorUnit){e.from=Math.floor(e.from/e.step)*e.step;b=true}if(b){e.steps=Math.ceil((e.to-e.from)/e.step)}h.prevMin=(g==a?0:g);h.prevMax=a;return e},drawAxis:function(N){var m=this,P,H=m.x,G=m.y,T=m.dashSize,p=m.length,I=m.position,b=(I=="left"||I=="right"),k=[],j=(m.isNumericAxis),t=m.applyData(),z=t.step,D=t.steps,F=Ext.isArray(D),h=t.from,S=t.to,g=(S-h)||1,Q,w,v,L,B=m.minorTickSteps||0,A=m.minorTickSteps||0,o=Math.max(B+1,0),n=Math.max(A+1,0),J=(I=="left"||I=="top"?-1:1),d=T*J,c=m.chart.series.items,M=c[0],q=M?M.nullGutters:m.nullGutters,O,R,r,E=0,C=0,a,K,u,s,e,l;m.from=h;m.to=S;if(m.hidden||(h>S)){return}if((F&&(D.length==0))||(!F&&isNaN(z))){return}if(F){D=Ext.Array.filter(D,function(x,i,y){return(+x>+m.from&&+x<+m.to)},this);D=Ext.Array.union([m.from],D,[m.to])}else{D=new Array;for(s=+m.from;s<+m.to;s+=z){D.push(s)}D.push(+m.to)}C=D.length;for(P=0,u=c.length;P<u;P++){if(c[P].seriesIsHidden){continue}if(!c[P].getAxesForXAndYFields){continue}K=c[P].getAxesForXAndYFields();if(!K.xAxis||!K.yAxis||(K.xAxis===I)||(K.yAxis===I)){q=c[P].getGutters();if((q.verticalAxis!==undefined)&&(q.verticalAxis!=b)){O=c[P].getPadding();if(b){q={lower:O.bottom,upper:O.top,verticalAxis:true}}else{q={lower:O.left,upper:O.right,verticalAxis:false}}}break}}if(j){m.labels=[]}if(q){if(b){w=Math.floor(H);L=["M",w+0.5,G,"l",0,-p];Q=p-(q.lower+q.upper);for(a=0;a<C;a++){v=G-q.lower-(D[a]-D[0])*Q/g;L.push("M",w,Math.floor(v)+0.5,"l",d*2,0);k.push([w,Math.floor(v)]);if(j){m.labels.push(D[a])}}}else{v=Math.floor(G);L=["M",H,v+0.5,"l",p,0];Q=p-(q.lower+q.upper);for(a=0;a<C;a++){w=H+q.lower+(D[a]-D[0])*Q/g;L.push("M",Math.floor(w)+0.5,v,"l",0,d*2+1);k.push([Math.floor(w),v]);if(j){m.labels.push(D[a])}}}}R=(b?A:B);if(Ext.isArray(R)){if(R.length==2){r=+Ext.Date.add(new Date(),R[0],R[1])-Date.now()}else{r=R[0]}}else{if(Ext.isNumber(R)&&R>0){r=z/(R+1)}}if(q&&r){for(a=0;a<C-1;a++){e=+D[a];l=+D[a+1];if(b){for(value=e+r;value<l;value+=r){v=G-q.lower-(value-D[0])*Q/g;L.push("M",w,Math.floor(v)+0.5,"l",d,0)}}else{for(value=e+r;value<l;value+=r){w=H+q.upper+(value-D[0])*Q/g;L.push("M",Math.floor(w)+0.5,v,"l",0,d+1)}}}}if(!m.axis){m.axis=m.chart.surface.add(Ext.apply({type:"path",path:L},m.axisStyle))}m.axis.setAttributes({path:L},true);m.inflections=k;if(!N&&m.grid){m.drawGrid()}m.axisBBox=m.axis.getBBox();m.drawLabel()},drawGrid:function(){var t=this,o=t.chart.surface,b=t.grid,d=b.odd,e=b.even,h=t.inflections,j=h.length-((d||e)?0:1),u=t.position,c=t.chart.maxGutters,n=t.width-2,p,q,r=1,m=[],g,a,k,l=[],s=[];if(((c.bottom!==0||c.top!==0)&&(u=="left"||u=="right"))||((c.left!==0||c.right!==0)&&(u=="top"||u=="bottom"))){r=0;j++}for(;r<j;r++){p=h[r];q=h[r-1];if(d||e){m=(r%2)?l:s;g=((r%2)?d:e)||{};a=(g.lineWidth||g["stroke-width"]||0)/2;k=2*a;if(u=="left"){m.push("M",q[0]+1+a,q[1]+0.5-a,"L",q[0]+1+n-a,q[1]+0.5-a,"L",p[0]+1+n-a,p[1]+0.5+a,"L",p[0]+1+a,p[1]+0.5+a,"Z")}else{if(u=="right"){m.push("M",q[0]-a,q[1]+0.5-a,"L",q[0]-n+a,q[1]+0.5-a,"L",p[0]-n+a,p[1]+0.5+a,"L",p[0]-a,p[1]+0.5+a,"Z")}else{if(u=="top"){m.push("M",q[0]+0.5+a,q[1]+1+a,"L",q[0]+0.5+a,q[1]+1+n-a,"L",p[0]+0.5-a,p[1]+1+n-a,"L",p[0]+0.5-a,p[1]+1+a,"Z")}else{m.push("M",q[0]+0.5+a,q[1]-a,"L",q[0]+0.5+a,q[1]-n+a,"L",p[0]+0.5-a,p[1]-n+a,"L",p[0]+0.5-a,p[1]-a,"Z")}}}}else{if(u=="left"){m=m.concat(["M",p[0]+0.5,p[1]+0.5,"l",n,0])}else{if(u=="right"){m=m.concat(["M",p[0]-0.5,p[1]+0.5,"l",-n,0])}else{if(u=="top"){m=m.concat(["M",p[0]+0.5,p[1]+0.5,"l",0,n])}else{m=m.concat(["M",p[0]+0.5,p[1]-0.5,"l",0,-n])}}}}}if(d||e){if(l.length){if(!t.gridOdd&&l.length){t.gridOdd=o.add({type:"path",path:l})}t.gridOdd.setAttributes(Ext.apply({path:l,hidden:false},d||{}),true)}if(s.length){if(!t.gridEven){t.gridEven=o.add({type:"path",path:s})}t.gridEven.setAttributes(Ext.apply({path:s,hidden:false},e||{}),true)}}else{if(m.length){if(!t.gridLines){t.gridLines=t.chart.surface.add({type:"path",path:m,"stroke-width":t.lineWidth||1,stroke:t.gridColor||"#ccc"})}t.gridLines.setAttributes({hidden:false,path:m},true)}else{if(t.gridLines){t.gridLines.hide(true)}}}},getOrCreateLabel:function(c,g){var d=this,b=d.labelGroup,e=b.getAt(c),a=d.chart.surface;if(e){if(g!=e.attr.text){e.setAttributes(Ext.apply({text:g},d.label),true);e._bbox=e.getBBox()}}else{e=a.add(Ext.apply({group:b,type:"text",x:0,y:0,text:g},d.label));a.renderItem(e);e._bbox=e.getBBox()}if(d.label.rotation){e.setAttributes({rotation:{degrees:0}},true);e._ubbox=e.getBBox();e.setAttributes(d.label,true)}else{e._ubbox=e._bbox}return e},rect2pointArray:function(l){var b=this.chart.surface,g=b.getBBox(l,true),m=[g.x,g.y],d=m.slice(),k=[g.x+g.width,g.y],a=k.slice(),j=[g.x+g.width,g.y+g.height],e=j.slice(),i=[g.x,g.y+g.height],c=i.slice(),h=l.matrix;m[0]=h.x.apply(h,d);m[1]=h.y.apply(h,d);k[0]=h.x.apply(h,a);k[1]=h.y.apply(h,a);j[0]=h.x.apply(h,e);j[1]=h.y.apply(h,e);i[0]=h.x.apply(h,c);i[1]=h.y.apply(h,c);return[m,k,j,i]},intersect:function(c,a){var d=this.rect2pointArray(c),b=this.rect2pointArray(a);return !!Ext.draw.Draw.intersect(d,b).length},drawHorizontalLabels:function(){var D=this,e=D.label,z=Math.floor,v=Math.max,w=D.chart.axes,h=D.chart.insetPadding,g=D.chart.maxGutters,E=D.position,k=D.inflections,o=k.length,C=D.labels,s=0,j,c,t,p,b,B=D.adjustEnd,a=w.findIndex("position","left")!=-1,n=w.findIndex("position","right")!=-1,A,r,m,q,l,u,d;m=o-1;t=k[0];d=D.getOrCreateLabel(0,D.label.renderer(C[0]));j=Math.floor(Math.abs(Math.sin(e.rotate&&(e.rotate.degrees*Math.PI/180)||0)));for(u=0;u<o;u++){t=k[u];r=D.label.renderer(C[u]);A=D.getOrCreateLabel(u,r);c=A._bbox;s=v(s,c.height+D.dashSize+D.label.padding);q=z(t[0]-(j?c.height:c.width)/2);if(B&&g.left==0&&g.right==0){if(u==0&&!a){q=t[0]}else{if(u==m&&!n){q=Math.min(q,t[0]-c.width+h)}}}if(E=="top"){l=t[1]-(D.dashSize*2)-D.label.padding-(c.height/2)}else{l=t[1]+(D.dashSize*2)+D.label.padding+(c.height/2)}A.setAttributes({hidden:false,x:q,y:l},true);if(u!=0&&(D.intersect(A,p)||D.intersect(A,d))){if(u===m&&b!==0){p.hide(true)}else{A.hide(true);continue}}p=A;b=u}return s},drawVerticalLabels:function(){var C=this,g=C.inflections,D=C.position,k=g.length,p=C.chart,e=p.insetPadding,B=C.labels,v=0,s=Math.max,u=Math.floor,c=Math.ceil,t=C.chart.axes,d=C.chart.maxGutters,b,q,l,a,o=t.findIndex("position","top")!=-1,w=t.findIndex("position","bottom")!=-1,A=C.adjustEnd,z,n,j=k-1,m,h,r;for(r=0;r<k;r++){q=g[r];n=C.label.renderer(B[r]);z=C.getOrCreateLabel(r,n);b=z._bbox;v=s(v,b.width+C.dashSize+C.label.padding);h=q[1];if(A&&(d.bottom+d.top)<b.height/2){if(r==j&&!o){h=Math.max(h,C.y-C.length+c(b.height/2)-e)}else{if(r==0&&!w){h=C.y+d.bottom-u(b.height/2)}}}if(D=="left"){m=q[0]-b.width-C.dashSize-C.label.padding-2}else{m=q[0]+C.dashSize+C.label.padding+2}z.setAttributes(Ext.apply({hidden:false,x:m,y:h},C.label),true);if(r!=0&&C.intersect(z,l)){if(r===j&&a!==0){l.hide(true)}else{z.hide(true);continue}}l=z;a=r}return v},drawLabel:function(){var h=this,a=h.position,b=h.labelGroup,j=h.inflections,g=0,e=0,d,c;if(a=="left"||a=="right"){g=h.drawVerticalLabels()}else{e=h.drawHorizontalLabels()}d=b.getCount();c=j.length;for(;c<d;c++){b.getAt(c).hide(true)}h.bbox={};Ext.apply(h.bbox,h.axisBBox);h.bbox.height=e;h.bbox.width=g;if(Ext.isString(h.title)){h.drawTitle(g,e)}},setTitle:function(a){this.title=a;this.drawLabel()},drawTitle:function(l,m){var h=this,g=h.position,b=h.chart.surface,c=h.displaySprite,k=h.title,e=(g=="left"||g=="right"),j=h.x,i=h.y,a,n,d;if(c){c.setAttributes({text:k},true)}else{a={type:"text",x:0,y:0,text:k};c=h.displaySprite=b.add(Ext.apply(a,h.axisTitleStyle,h.labelTitle));b.renderItem(c)}n=c.getBBox();d=h.dashSize+h.label.padding;if(e){i-=((h.length/2)-(n.height/2));if(g=="left"){j-=(l+d+(n.width/2))}else{j+=(l+d+n.width-(n.width/2))}h.bbox.width+=n.width+10}else{j+=(h.length/2)-(n.width*0.5);if(g=="top"){i-=(m+d+(n.height*0.3))}else{i+=(m+d+(n.height*0.8))}h.bbox.height+=n.height+10}c.setAttributes({translate:{x:j,y:i}},true)}});Ext.define("Ext.chart.axis.Category",{extend:Ext.chart.axis.Axis,alternateClassName:"Ext.chart.CategoryAxis",alias:"axis.category",categoryNames:null,calculateCategoryCount:false,doConstrain:function(){var h=this,g=h.chart,c=g.getChartStore(),b=c.data.items,e=g.series.items,a=e.length,j=[],d;for(d=0;d<a;d++){if(e[d].type==="bar"&&e[d].stacked){return}}for(d=h.minimum;d<h.maximum;d++){j.push(b[d])}g.setSubStore(new Ext.data.Store({model:c.model,data:j}))},setLabels:function(){var m=this.chart.getChartStore(),c=m.data.items,k,h,e,j=this.fields,l=j.length,g,a,b;g=this.labels=[];for(k=0,h=c.length;k<h;k++){e=c[k];for(b=0;b<l;b++){a=e.get(j[b]);g.push(a)}}},applyData:function(){this.callParent();this.setLabels();var a=this.chart.getChartStore().getCount();return{from:0,to:a-1,power:1,step:1,steps:a-1}}});Ext.define("Ext.chart.axis.Gauge",{extend:Ext.chart.axis.Abstract,position:"gauge",alias:"axis.gauge",drawAxis:function(q){var j=this.chart,a=j.surface,p=j.chartBBox,d=p.x+(p.width/2),b=p.y+p.height,c=this.margin||10,m=Math.min(p.width,2*p.height)/2+c,h=[],n,l=this.steps,e,g=Math.PI,o=Math.cos,k=Math.sin;if(this.sprites&&!j.resizing){this.drawLabel();return}if(this.margin>=0){if(!this.sprites){for(e=0;e<=l;e++){n=a.add({type:"path",path:["M",d+(m-c)*o(e/l*g-g),b+(m-c)*k(e/l*g-g),"L",d+m*o(e/l*g-g),b+m*k(e/l*g-g),"Z"],stroke:"#ccc"});n.setAttributes({hidden:false},true);h.push(n)}}else{h=this.sprites;for(e=0;e<=l;e++){h[e].setAttributes({path:["M",d+(m-c)*o(e/l*g-g),b+(m-c)*k(e/l*g-g),"L",d+m*o(e/l*g-g),b+m*k(e/l*g-g),"Z"],stroke:"#ccc"},true)}}}this.sprites=h;this.drawLabel();if(this.title){this.drawTitle()}},drawTitle:function(){var e=this,d=e.chart,a=d.surface,g=d.chartBBox,c=e.titleSprite,b;if(!c){e.titleSprite=c=a.add(Ext.apply({type:"text",zIndex:2},e.axisTitleStyle,e.labelTitle))}c.setAttributes(Ext.apply({text:e.title},e.label||{}),true);b=c.getBBox();c.setAttributes({x:g.x+(g.width/2)-(b.width/2),y:g.y+g.height-(b.height/2)-4},true)},setTitle:function(a){this.title=a;this.drawTitle()},drawLabel:function(){var l=this.chart,p=l.surface,b=l.chartBBox,j=b.x+(b.width/2),h=b.y+b.height,m=this.margin||10,d=Math.min(b.width,2*b.height)/2+2*m,u=Math.round,n=[],g,s=this.maximum||0,k=this.minimum||0,r=this.steps,q=0,v,t=Math.PI,c=Math.cos,a=Math.sin,e=this.label,o=e.renderer||Ext.identityFn;if(!this.labelArray){for(q=0;q<=r;q++){v=(q===0||q===r)?7:0;g=p.add({type:"text",text:o(u(k+q/r*(s-k))),x:j+d*c(q/r*t-t),y:h+d*a(q/r*t-t)-v,"text-anchor":"middle","stroke-width":0.2,zIndex:10,stroke:"#333"});g.setAttributes({hidden:false},true);n.push(g)}}else{n=this.labelArray;for(q=0;q<=r;q++){v=(q===0||q===r)?7:0;n[q].setAttributes({text:o(u(k+q/r*(s-k))),x:j+d*c(q/r*t-t),y:h+d*a(q/r*t-t)-v},true)}}this.labelArray=n}});Ext.define("Ext.chart.axis.Numeric",{extend:Ext.chart.axis.Axis,alternateClassName:"Ext.chart.NumericAxis",type:"Numeric",isNumericAxis:true,alias:"axis.numeric",constructor:function(c){var d=this,a=!!(c.label&&c.label.renderer),b;d.callParent([c]);b=d.label;if(c.constrain==null){d.constrain=(c.minimum!=null&&c.maximum!=null)}if(!a){b.renderer=function(e){return d.roundToDecimal(e,d.decimals)}}},roundToDecimal:function(a,c){var b=Math.pow(10,c||0);return Math.round(a*b)/b},minimum:NaN,maximum:NaN,constrain:true,decimals:2,scale:"linear",doConstrain:function(){var u=this,h=u.chart,b=h.getChartStore(),j=b.data.items,t,w,a,e=h.series.items,k=u.fields,c=k.length,g=u.calcEnds(),n=g.from,q=g.to,r,o,s=false,m,v=[],p;for(t=0,w=j.length;t<w;t++){p=true;a=j[t];for(r=0;r<c;r++){m=a.get(k[r]);if(u.type=="Time"&&typeof m=="string"){m=Date.parse(m)}if(+m<+n){p=false;break}if(+m>+q){p=false;break}}if(p){v.push(a)}}h.setSubStore(new Ext.data.Store({model:b.model,data:v}))},position:"left",adjustMaximumByMajorUnit:false,adjustMinimumByMajorUnit:false,processView:function(){var e=this,d=e.chart,c=d.series.items,b,a;for(b=0,a=c.length;b<a;b++){if(c[b].stacked){delete e.minimum;delete e.maximum;e.constrain=false;break}}if(e.constrain){e.doConstrain()}},applyData:function(){this.callParent();return this.calcEnds()}});Ext.define("Ext.chart.axis.Radial",{extend:Ext.chart.axis.Numeric,position:"radial",alias:"axis.radial",drawAxis:function(u){var m=this.chart,a=m.surface,t=m.chartBBox,q=m.getChartStore(),b=q.getCount(),e=t.x+(t.width/2),c=t.y+(t.height/2),p=Math.min(t.width,t.height)/2,k=[],r,o=this.steps,g,d,h=Math.PI*2,s=Math.cos,n=Math.sin;if(this.sprites&&!m.resizing){this.drawLabel();return}if(!this.sprites){for(g=1;g<=o;g++){r=a.add({type:"circle",x:e,y:c,radius:Math.max(p*g/o,0),stroke:"#ccc"});r.setAttributes({hidden:false},true);k.push(r)}for(g=0;g<b;g++){r=a.add({type:"path",path:["M",e,c,"L",e+p*s(g/b*h),c+p*n(g/b*h),"Z"],stroke:"#ccc"});r.setAttributes({hidden:false},true);k.push(r)}}else{k=this.sprites;for(g=0;g<o;g++){k[g].setAttributes({x:e,y:c,radius:Math.max(p*(g+1)/o,0),stroke:"#ccc"},true)}for(d=0;d<b;d++){k[g+d].setAttributes({path:["M",e,c,"L",e+p*s(d/b*h),c+p*n(d/b*h),"Z"],stroke:"#ccc"},true)}}this.sprites=k;this.drawLabel()},drawLabel:function(){var w=this.chart,c=w.series.items,r,B=w.surface,b=w.chartBBox,l=w.getChartStore(),J=l.data.items,p,k,o=b.x+(b.width/2),n=b.y+(b.height/2),h=Math.min(b.width,b.height)/2,F=Math.max,I=Math.round,x=[],m,z=[],d,A=[],g,v=!this.maximum,H=this.maximum||0,G=this.steps,E=0,D,t,s,y=Math.PI*2,e=Math.cos,a=Math.sin,C=this.label.display,q=C!=="none",u=10;if(!q){return}for(E=0,p=c.length;E<p;E++){r=c[E];z.push(r.yField);g=r.xField}for(D=0,p=J.length;D<p;D++){k=J[D];A.push(k.get(g));if(v){for(E=0,d=z.length;E<d;E++){H=F(+k.get(z[E]),H)}}}if(!this.labelArray){if(C!="categories"){for(E=1;E<=G;E++){m=B.add({type:"text",text:I(E/G*H),x:o,y:n-h*E/G,"text-anchor":"middle","stroke-width":0.1,stroke:"#333"});m.setAttributes({hidden:false},true);x.push(m)}}if(C!="scale"){for(D=0,G=A.length;D<G;D++){t=e(D/G*y)*(h+u);s=a(D/G*y)*(h+u);m=B.add({type:"text",text:A[D],x:o+t,y:n+s,"text-anchor":t*t<=0.001?"middle":(t<0?"end":"start")});m.setAttributes({hidden:false},true);x.push(m)}}}else{x=this.labelArray;if(C!="categories"){for(E=0;E<G;E++){x[E].setAttributes({text:I((E+1)/G*H),x:o,y:n-h*(E+1)/G,"text-anchor":"middle","stroke-width":0.1,stroke:"#333"},true)}}if(C!="scale"){for(D=0,G=A.length;D<G;D++){t=e(D/G*y)*(h+u);s=a(D/G*y)*(h+u);if(x[E+D]){x[E+D].setAttributes({type:"text",text:A[D],x:o+t,y:n+s,"text-anchor":t*t<=0.001?"middle":(t<0?"end":"start")},true)}}}}this.labelArray=x},getRange:function(){var a=this.callParent();a.min=0;return a},processView:function(){var h=this,c=h.chart.series.items,e,g,d,b,a=[];for(e=0,g=c.length;e<g;e++){d=c[e];a.push(d.yField)}h.fields=a;b=h.calcEnds();h.maximum=b.to;h.steps=b.steps}});Ext.define("Ext.chart.axis.Time",{extend:Ext.chart.axis.Numeric,alternateClassName:"Ext.chart.TimeAxis",type:"Time",alias:"axis.time",dateFormat:false,fromDate:false,toDate:false,step:[Ext.Date.DAY,1],constrain:false,constructor:function(b){var c=this,a,d,e;c.callParent([b]);a=c.label||{};e=this.dateFormat;if(e){if(a.renderer){d=a.renderer;a.renderer=function(g){g=d(g);return Ext.Date.format(new Date(d(g)),e)}}else{a.renderer=function(g){return Ext.Date.format(new Date(g>>0),e)}}}},processView:function(){var a=this;if(a.fromDate){a.minimum=+a.fromDate}if(a.toDate){a.maximum=+a.toDate}if(a.constrain){a.doConstrain()}},calcEnds:function(){var c=this,a,b=c.step;if(b){a=c.getRange();a=Ext.draw.Draw.snapEndsByDateAndStep(new Date(a.min),new Date(a.max),Ext.isNumber(b)?[Date.MILLI,b]:b);if(c.minimum){a.from=c.minimum}if(c.maximum){a.to=c.maximum}return a}else{return c.callParent(arguments)}}});Ext.define("Ext.chart.series.Series",{mixins:{observable:Ext.util.Observable,labels:Ext.chart.Label,highlights:Ext.chart.Highlight,tips:Ext.chart.Tip,callouts:Ext.chart.Callout},type:null,title:null,showInLegend:true,renderer:function(e,a,c,d,b){return c},shadowAttributes:null,animating:false,nullGutters:{lower:0,upper:0,verticalAxis:undefined},nullPadding:{left:0,right:0,width:0,bottom:0,top:0,height:0},constructor:function(a){var b=this;if(a){Ext.apply(b,a)}b.shadowGroups=[];b.mixins.labels.constructor.call(b,a);b.mixins.highlights.constructor.call(b,a);b.mixins.tips.constructor.call(b,a);b.mixins.callouts.constructor.call(b,a);b.addEvents({scope:b,itemclick:true,itemmouseover:true,itemmouseout:true,itemmousedown:true,itemmouseup:true,mouseleave:true,afterdraw:true,titlechange:true});b.mixins.observable.constructor.call(b,a);b.on({scope:b,itemmouseover:b.onItemMouseOver,itemmouseout:b.onItemMouseOut,mouseleave:b.onMouseLeave});if(b.style){Ext.apply(b.seriesStyle,b.style)}},onRedraw:Ext.emptyFn,eachRecord:function(c,b){var a=this.chart;a.getChartStore().each(c,b)},getRecordCount:function(){var b=this.chart,a=b.getChartStore();return a?a.getCount():0},isExcluded:function(a){var b=this.__excludes;return !!(b&&b[a])},setBBox:function(a){var d=this,c=d.chart,b=c.chartBBox,h=a?{left:0,right:0,bottom:0,top:0}:c.maxGutters,e,g;e={x:b.x,y:b.y,width:b.width,height:b.height};d.clipBox=e;g={x:(e.x+h.left)-(c.zoom.x*c.zoom.width),y:(e.y+h.bottom)-(c.zoom.y*c.zoom.height),width:(e.width-(h.left+h.right))*c.zoom.width,height:(e.height-(h.bottom+h.top))*c.zoom.height};d.bbox=g},onAnimate:function(b,a){var c=this;b.stopAnimation();if(c.animating){return b.animate(Ext.applyIf(a,c.chart.animate))}else{c.animating=true;return b.animate(Ext.apply(Ext.applyIf(a,c.chart.animate),{callback:function(){c.animating=false;c.fireEvent("afterrender")}}))}},getGutters:function(){return this.nullGutters},getPadding:function(){return this.nullPadding},onItemMouseOver:function(b){var a=this;if(b.series===a){if(a.highlight){a.highlightItem(b)}if(a.tooltip){a.showTip(b)}}},onItemMouseOut:function(b){var a=this;if(b.series===a){a.unHighlightItem();if(a.tooltip){a.hideTip(b)}}},onMouseLeave:function(){var a=this;a.unHighlightItem();if(a.tooltip){a.hideTip()}},getItemForPoint:function(a,j){if(!this.items||!this.items.length||this.seriesIsHidden){return null}var g=this,b=g.items,h=g.bbox,e,c,d;if(!Ext.draw.Draw.withinBox(a,j,h)){return null}for(c=0,d=b.length;c<d;c++){if(b[c]&&this.isItemInPoint(a,j,b[c],c)){return b[c]}}return null},isItemInPoint:function(a,d,c,b){return false},hideAll:function(){var h=this,g=h.items,m,e,d,c,a,k,b;h.seriesIsHidden=true;h._prevShowMarkers=h.showMarkers;h.showMarkers=false;h.hideLabels(0);for(d=0,e=g.length;d<e;d++){m=g[d];k=m.sprite;if(k){k.setAttributes({hidden:true},true)}if(k&&k.shadows){b=k.shadows;for(c=0,a=b.length;c<a;++c){b[c].setAttributes({hidden:true},true)}}}},showAll:function(){var a=this,b=a.chart.animate;a.chart.animate=false;a.seriesIsHidden=false;a.showMarkers=a._prevShowMarkers;a.drawSeries();a.chart.animate=b},hide:function(){if(this.items){var h=this,b=h.items,d,c,a,g,e;if(b&&b.length){for(d=0,g=b.length;d<g;++d){if(b[d].sprite){b[d].sprite.hide(true);e=b[d].shadows||b[d].sprite.shadows;if(e){for(c=0,a=e.length;c<a;++c){e[c].hide(true)}}}}h.hideLabels()}}},getLegendColor:function(a){var b=this,d,c;if(b.seriesStyle){d=b.seriesStyle.fill;c=b.seriesStyle.stroke;if(d&&d!="none"){return d}if(c){return c}}return(b.colorArrayStyle)?b.colorArrayStyle[b.themeIdx%b.colorArrayStyle.length]:"#000"},visibleInLegend:function(a){var b=this.__excludes;if(b){return !b[a]}return !this.seriesIsHidden},setTitle:function(a,d){var c=this,b=c.title;if(Ext.isString(a)){d=a;a=0}if(Ext.isArray(b)){b[a]=d}else{c.title=d}c.fireEvent("titlechange",d,a)}});Ext.define("Ext.chart.series.Cartesian",{extend:Ext.chart.series.Series,alternateClassName:["Ext.chart.CartesianSeries","Ext.chart.CartesianChart"],xField:null,yField:null,axis:"left",getLegendLabels:function(){var j=this,e=[],g,d,h,k=j.combinations,l,a,c,b;g=[].concat(j.yField);for(d=0,h=g.length;d<h;d++){l=j.title;e.push((Ext.isArray(l)?l[d]:l)||g[d])}if(k){k=Ext.Array.from(k);for(d=0,h=k.length;d<h;d++){a=k[d];c=e[a[0]];b=e[a[1]];e[a[1]]=c+" & "+b;e.splice(a[0],1)}}return e},eachYValue:function(b,e,d){var j=this,h=j.getYValueAccessors(),c,g,a;for(c=0,g=h.length;c<g;c++){a=h[c];e.call(d,a(b),c)}},getYValueCount:function(){return this.getYValueAccessors().length},combine:function(g,e){var d=this,c=d.getYValueAccessors(),b=c[g],a=c[e];c[e]=function(h){return b(h)+a(h)};c.splice(g,1);d.callParent([g,e])},clearCombinations:function(){delete this.yValueAccessors;this.callParent()},getYValueAccessors:function(){var e=this,a=e.yValueAccessors,g,c,b,d;if(!a){a=e.yValueAccessors=[];g=[].concat(e.yField);for(b=0,d=g.length;b<d;b++){c=g[b];a.push(function(h){return h.get(c)})}}return a},getMinMaxXValues:function(){var l=this,k=l.chart,n=k.getChartStore(),d=n.data.items,h=l.getRecordCount(),e,j,g,c,m,a=l.xField,b;if(h>0){c=Infinity;m=-c;for(e=0,j=d.length;e<j;e++){g=d[e];b=g.get(a);if(b>m){m=b}if(b<c){c=b}}if(c==Infinity){c=0}if(m==-Infinity){m=h-1}}else{c=m=0}return[c,m]},getMinMaxYValues:function(){var l=this,k=l.chart,p=k.getChartStore(),c=p.data.items,g=l.getRecordCount(),d,j,e,h=l.stacked,b,m,o,n;function a(s,r){if(!l.isExcluded(r)){if(s<0){n+=s}else{o+=s}}}function q(s,r){if(!l.isExcluded(r)){if(s>m){m=s}if(s<b){b=s}}}if(g>0){b=Infinity;m=-b;for(d=0,j=c.length;d<j;d++){e=c[d];if(h){o=0;n=0;l.eachYValue(e,a);if(o>m){m=o}if(n<b){b=n}}else{l.eachYValue(e,q)}}if(b==Infinity){b=0}if(m==-Infinity){m=g-1}}else{b=m=0}return[b,m]},getAxesForXAndYFields:function(){var m=this,l=m.chart.axes,d=[].concat(m.axis),c={},e=[].concat(m.yField),n={},o=[].concat(m.xField),j,b,a,h,k,g;g=m.type==="bar"&&m.column===false;if(g){j=e;e=o;o=j}if(Ext.Array.indexOf(d,"top")>-1){b="top"}else{if(Ext.Array.indexOf(d,"bottom")>-1){b="bottom"}else{if(l.get("top")&&l.get("bottom")){for(h=0,k=o.length;h<k;h++){n[o[h]]=true}j=[].concat(l.get("bottom").fields);for(h=0,k=j.length;h<k;h++){if(n[j[h]]){b="bottom";break}}j=[].concat(l.get("top").fields);for(h=0,k=j.length;h<k;h++){if(n[j[h]]){b="top";break}}}else{if(l.get("top")){b="top"}else{if(l.get("bottom")){b="bottom"}}}}}if(Ext.Array.indexOf(d,"left")>-1){a="left"}else{if(Ext.Array.indexOf(d,"right")>-1){a="right"}else{if(l.get("left")&&l.get("right")){for(h=0,k=e.length;h<k;h++){c[e[h]]=true}j=[].concat(l.get("right").fields);for(h=0,k=j.length;h<k;h++){if(c[j[h]]){break}}j=[].concat(l.get("left").fields);for(h=0,k=j.length;h<k;h++){if(c[j[h]]){a="left";break}}}else{if(l.get("left")){a="left"}else{if(l.get("right")){a="right"}}}}}return g?{xAxis:a,yAxis:b}:{xAxis:b,yAxis:a}}});Ext.define("Ext.chart.series.Area",{extend:Ext.chart.series.Cartesian,alias:"series.area",type:"area",stacked:true,style:{},constructor:function(c){this.callParent(arguments);var e=this,a=e.chart.surface,d,b;c.highlightCfg=Ext.Object.merge({},{lineWidth:3,stroke:"#55c",opacity:0.8,color:"#f00"},c.highlightCfg);Ext.apply(e,c,{__excludes:[]});if(e.highlight){e.highlightSprite=a.add({type:"path",path:["M",0,0],zIndex:1000,opacity:0.3,lineWidth:5,hidden:true,stroke:"#444"})}e.group=a.getGroup(e.seriesId)},shrink:function(b,n,o){var k=b.length,m=Math.floor(k/o),h,g,d=0,l=this.areas.length,a=[],e=[],c=[];for(g=0;g<l;++g){a[g]=0}for(h=0;h<k;++h){d+=+b[h];for(g=0;g<l;++g){a[g]+=+n[h][g]}if(h%m==0){e.push(d/m);for(g=0;g<l;++g){a[g]/=m}c.push(a);d=0;for(g=0,a=[];g<l;++g){a[g]=0}}}return{x:e,y:c}},getBounds:function(){var j=this,N=j.chart,a=N.getChartStore(),M=a.data.items,J,G,x,v=[].concat(j.yField),A=v.length,z=[],D=[],g=Infinity,C=g,B=g,n=-g,m=-g,s=Math,w=s.min,e=s.max,p=j.getAxesForXAndYFields(),K=p.xAxis,u=p.yAxis,H,r,E,k,h,F,q,O,L,b,t,I,c,d,o,y;j.setBBox();k=j.bbox;if(o=N.axes.get(K)){if(o.type==="Time"){r=true}H=o.applyData();C=H.from;n=H.to}if(o=N.axes.get(u)){H=o.applyData();B=H.from;m=H.to}if(j.xField&&!Ext.isNumber(C)){o=j.getMinMaxXValues();r=true;C=o[0];n=o[1]}if(j.yField&&!Ext.isNumber(B)){o=j.getMinMaxYValues();B=o[0];m=o[1]}if(!Ext.isNumber(B)){B=0}if(!Ext.isNumber(m)){m=0}G=M.length;if(G>0&&r){E=M[0].get(j.xField);if(typeof E!="number"){E=+E;if(isNaN(E)){r=false}}}for(J=0;J<G;J++){x=M[J];q=x.get(j.xField);O=[];if(typeof q!="number"){if(r){q=+q}else{q=J}}z.push(q);b=0;for(L=0;L<A;L++){if(j.__excludes[L]){continue}d=x.get(v[L]);if(typeof d=="number"){O.push(d)}}D.push(O)}h=k.width/((n-C)||1);F=k.height/((m-B)||1);t=z.length;if((t>k.width)&&j.areas){I=j.shrink(z,D,k.width);z=I.x;D=I.y}return{bbox:k,minX:C,minY:B,xValues:z,yValues:D,xScale:h,yScale:F,areasLen:A}},getPaths:function(){var z=this,m=z.chart,c=m.getChartStore(),e=true,g=z.getBounds(),a=g.bbox,n=z.items=[],w=[],b,d=0,p=[],s,j,k,h,q,u,l,A,r,v,o,t;j=g.xValues.length;for(s=0;s<j;s++){q=g.xValues[s];u=g.yValues[s];k=a.x+(q-g.minX)*g.xScale;if(t===undefined){t=k}l=0;d=0;for(A=0;A<g.areasLen;A++){if(z.__excludes[A]){continue}if(!w[A]){w[A]=[]}v=u[d];l+=v;h=a.y+a.height-(l-g.minY)*g.yScale;if(!p[A]){p[A]=["M",k,h];w[A].push(["L",k,h])}else{p[A].push("L",k,h);w[A].push(["L",k,h])}if(!n[A]){n[A]={pointsUp:[],pointsDown:[],series:z}}n[A].pointsUp.push([k,h]);d++}}for(A=0;A<g.areasLen;A++){if(z.__excludes[A]){continue}o=p[A];if(A==0||e){e=false;o.push("L",k,a.y+a.height,"L",t,a.y+a.height,"Z")}else{b=w[r];b.reverse();o.push("L",k,b[0][2]);for(s=0;s<j;s++){o.push(b[s][0],b[s][1],b[s][2]);n[A].pointsDown[j-s-1]=[b[s][1],b[s][2]]}o.push("L",t,o[2],"Z")}r=A}return{paths:p,areasLen:g.areasLen}},drawSeries:function(){var i=this,h=i.chart,k=h.getChartStore(),d=h.surface,c=h.animate,m=i.group,b=Ext.apply(i.seriesStyle,i.style),n=i.colorArrayStyle,q=n&&n.length||0,a=i.themeIdx,e,g,p,o,l,j;i.unHighlightItem();i.cleanHighlights();if(!k||!k.getCount()||i.seriesIsHidden){i.hide();i.items=[];return}p=i.getPaths();if(!i.areas){i.areas=[]}for(e=0;e<p.areasLen;e++){if(i.__excludes[e]){continue}j=a+e;if(!i.areas[e]){i.items[e].sprite=i.areas[e]=d.add(Ext.apply({},{type:"path",group:m,path:p.paths[e],stroke:b.stroke||n[j%q],fill:n[j%q]},b||{}))}g=i.areas[e];o=p.paths[e];if(c){l=i.renderer(g,false,{path:o,fill:n[e%q],stroke:b.stroke||n[e%q]},e,k);i.animation=i.onAnimate(g,{to:l})}else{l=i.renderer(g,false,{path:o,hidden:false,fill:n[j%q],stroke:b.stroke||n[j%q]},e,k);i.areas[e].setAttributes(l,true)}}i.renderLabels();i.renderCallouts()},onAnimate:function(b,a){b.show();return this.callParent(arguments)},onCreateLabel:function(d,k,c,e){var g=this,h=g.labelsGroup,a=g.label,j=g.bbox,b=Ext.apply(a,g.seriesLabelStyle);return g.chart.surface.add(Ext.apply({type:"text","text-anchor":"middle",group:h,x:k.point[0],y:j.y+j.height/2},b||{}))},onPlaceLabel:function(g,k,s,p,o,c,e){var u=this,l=u.chart,r=l.resizing,t=u.label,q=t.renderer,b=t.field,a=u.bbox,j=s.point[0],h=s.point[1],d,n,m;g.setAttributes({text:q(k.get(b[e]),g,k,s,p,o,c,e),hidden:true},true);d=g.getBBox();n=d.width/2;m=d.height/2;j=j-n<a.x?a.x+n:j;j=(j+n>a.x+a.width)?(j-(j+n-a.x-a.width)):j;h=h-m<a.y?a.y+m:h;h=(h+m>a.y+a.height)?(h-(h+m-a.y-a.height)):h;if(u.chart.animate&&!u.chart.resizing){g.show(true);u.onAnimate(g,{to:{x:j,y:h}})}else{g.setAttributes({x:j,y:h},true);if(r){u.animation.on("afteranimate",function(){g.show(true)})}else{g.show(true)}}},onPlaceCallout:function(m,r,J,G,F,d,k){var M=this,s=M.chart,D=s.surface,H=s.resizing,L=M.callouts,t=M.items,v=(G==0)?false:t[G-1].point,z=(G==t.length-1)?false:t[G+1].point,c=J.point,A,g,N,K,o,q,b=(m&&m.label?m.label.getBBox():{width:0,height:0}),I=30,C=10,B=3,h,e,j,w,u,E=M.clipRect,n,l;if(!b.width||!b.height){return}if(!v){v=c}if(!z){z=c}K=(z[1]-v[1])/(z[0]-v[0]);o=(c[1]-v[1])/(c[0]-v[0]);q=(z[1]-c[1])/(z[0]-c[0]);g=Math.sqrt(1+K*K);A=[1/g,K/g];N=[-A[1],A[0]];if(o>0&&q<0&&N[1]<0||o<0&&q>0&&N[1]>0){N[0]*=-1;N[1]*=-1}else{if(Math.abs(o)<Math.abs(q)&&N[0]<0||Math.abs(o)>Math.abs(q)&&N[0]>0){N[0]*=-1;N[1]*=-1}}n=c[0]+N[0]*I;l=c[1]+N[1]*I;h=n+(N[0]>0?0:-(b.width+2*B));e=l-b.height/2-B;j=b.width+2*B;w=b.height+2*B;if(h<E[0]||(h+j)>(E[0]+E[2])){N[0]*=-1}if(e<E[1]||(e+w)>(E[1]+E[3])){N[1]*=-1}n=c[0]+N[0]*I;l=c[1]+N[1]*I;h=n+(N[0]>0?0:-(b.width+2*B));e=l-b.height/2-B;j=b.width+2*B;w=b.height+2*B;m.lines.setAttributes({path:["M",c[0],c[1],"L",n,l,"Z"]},true);m.box.setAttributes({x:h,y:e,width:j,height:w},true);m.label.setAttributes({x:n+(N[0]>0?B:-(b.width+B)),y:l},true);for(u in m){m[u].show(true)}},isItemInPoint:function(j,h,m,c){var g=this,b=m.pointsUp,d=m.pointsDown,q=Math.abs,o=false,l=false,e=Infinity,a,n,k;for(a=0,n=b.length;a<n;a++){k=[b[a][0],b[a][1]];o=false;l=a==n-1;if(e>q(j-k[0])){e=q(j-k[0]);o=true;if(l){++a}}if(!o||(o&&l)){k=b[a-1];if(h>=k[1]&&(!d.length||h<=(d[a-1][1]))){m.storeIndex=a-1;m.storeField=g.yField[c];m.storeItem=g.chart.getChartStore().getAt(a-1);m._points=d.length?[k,d[a-1]]:[k];return true}else{break}}}return false},highlightSeries:function(){var a,c,b;if(this._index!==undefined){a=this.areas[this._index];if(a.__highlightAnim){a.__highlightAnim.paused=true}a.__highlighted=true;a.__prevOpacity=a.__prevOpacity||a.attr.opacity||1;a.__prevFill=a.__prevFill||a.attr.fill;a.__prevLineWidth=a.__prevLineWidth||a.attr.lineWidth;b=Ext.draw.Color.fromString(a.__prevFill);c={lineWidth:(a.__prevLineWidth||0)+2};if(b){c.fill=b.getLighter(0.2).toString()}else{c.opacity=Math.max(a.__prevOpacity-0.3,0)}if(this.chart.animate){a.__highlightAnim=new Ext.fx.Anim(Ext.apply({target:a,to:c},this.chart.animate))}else{a.setAttributes(c,true)}}},unHighlightSeries:function(){var a;if(this._index!==undefined){a=this.areas[this._index];if(a.__highlightAnim){a.__highlightAnim.paused=true}if(a.__highlighted){a.__highlighted=false;a.__highlightAnim=new Ext.fx.Anim({target:a,to:{fill:a.__prevFill,opacity:a.__prevOpacity,lineWidth:a.__prevLineWidth}})}}},highlightItem:function(c){var b=this,a,d;if(!c){this.highlightSeries();return}a=c._points;d=a.length==2?["M",a[0][0],a[0][1],"L",a[1][0],a[1][1]]:["M",a[0][0],a[0][1],"L",a[0][0],b.bbox.y+b.bbox.height];b.highlightSprite.setAttributes({path:d,hidden:false},true)},unHighlightItem:function(a){if(!a){this.unHighlightSeries()}if(this.highlightSprite){this.highlightSprite.hide(true)}},hideAll:function(a){var b=this;a=(isNaN(b._index)?a:b._index)||0;b.__excludes[a]=true;b.areas[a].hide(true);b.redraw()},showAll:function(a){var b=this;a=(isNaN(b._index)?a:b._index)||0;b.__excludes[a]=false;b.areas[a].show(true);b.redraw()},redraw:function(){var a=this,b;b=a.chart.legend.rebuild;a.chart.legend.rebuild=false;a.chart.redraw();a.chart.legend.rebuild=b},hide:function(){if(this.areas){var h=this,b=h.areas,d,c,a,g,e;if(b&&b.length){for(d=0,g=b.length;d<g;++d){if(b[d]){b[d].hide(true)}}h.hideLabels()}}},getLegendColor:function(a){var b=this;a+=b.themeIdx;return b.colorArrayStyle[a%b.colorArrayStyle.length]}});Ext.define("Ext.chart.series.Bar",{extend:Ext.chart.series.Cartesian,alternateClassName:["Ext.chart.BarSeries","Ext.chart.BarChart","Ext.chart.StackedBarChart"],type:"bar",alias:"series.bar",column:false,style:{},gutter:38.2,groupGutter:38.2,xPadding:0,yPadding:10,constructor:function(c){this.callParent(arguments);var e=this,a=e.chart.surface,g=e.chart.shadow,d,b;c.highlightCfg=Ext.Object.merge({lineWidth:3,stroke:"#55c",opacity:0.8,color:"#f00"},c.highlightCfg);Ext.apply(e,c,{shadowAttributes:[{"stroke-width":6,"stroke-opacity":0.05,stroke:"rgb(200, 200, 200)",translate:{x:1.2,y:1.2}},{"stroke-width":4,"stroke-opacity":0.1,stroke:"rgb(150, 150, 150)",translate:{x:0.9,y:0.9}},{"stroke-width":2,"stroke-opacity":0.15,stroke:"rgb(100, 100, 100)",translate:{x:0.6,y:0.6}}]});e.group=a.getGroup(e.seriesId+"-bars");if(g){for(d=0,b=e.shadowAttributes.length;d<b;d++){e.shadowGroups.push(a.getGroup(e.seriesId+"-shadows"+d))}}},getPadding:function(){var c=this,b=c.xPadding,a=c.yPadding,d={};if(Ext.isNumber(b)){d.left=b;d.right=b}else{if(Ext.isObject(b)){d.left=b.left;d.right=b.right}else{d.left=0;d.right=0}}d.width=d.left+d.right;if(Ext.isNumber(a)){d.bottom=a;d.top=a}else{if(Ext.isObject(a)){d.bottom=a.bottom;d.top=a.top}else{d.bottom=0;d.top=0}}d.height=d.bottom+d.top;return d},getBarGirth:function(){var d=this,a=d.chart.getChartStore(),b=d.column,c=a.getCount(),h=d.gutter/100,g,e;if(d.style&&d.style.width){return d.style.width}g=d.getPadding();e=(b?"width":"height");return(d.chart.chartBBox[e]-g[e])/(c*(h+1)-h)},getGutters:function(){var c=this,b=c.column,e=c.getPadding(),d=c.getBarGirth()/2,g=Math.ceil((b?e.left:e.bottom)+d),a=Math.ceil((b?e.right:e.top)+d);return{lower:g,upper:a,verticalAxis:!b}},getBounds:function(){var o=this,T=o.chart,b=T.getChartStore(),S=b.data.items,R,z,F,x=[].concat(o.yField),l,p=x.length,m=p,c=o.groupGutter/100,K=o.column,P=o.getPadding(),N=o.stacked,v=o.getBarGirth(),A=K?"width":"height",w=Math,D=w.min,k=w.max,n=w.abs,I=o.getAxesForXAndYFields(),C=I.yAxis,J,t,M,h,s,Q,E,e,q,H,r,u,G,B,a,y,L,O,d,g;o.setBBox(true);q=o.bbox;if(o.__excludes){for(O=0,y=o.__excludes.length;O<y;O++){if(o.__excludes[O]){m--}}}u=T.axes.get(C);if(u){Q=u.applyData();H=Q.from;r=Q.to}if(o.yField&&!Ext.isNumber(H)){G=o.getMinMaxYValues();H=G[0];r=G[1]}if(!Ext.isNumber(H)){H=0}if(!Ext.isNumber(r)){r=0}B=(K?q.height-P.height:q.width-P.width)/(r-H);E=v;e=(v/((N?1:m)*(c+1)-c));if(A in o.style){e=D(e,o.style[A]);E=e*((N?1:m)*(c+1)-c)}a=(K)?q.y+q.height-P.bottom:q.x+P.left;if(N){y=[[],[]];for(R=0,z=S.length;R<z;R++){F=S[R];y[0][R]=y[0][R]||0;y[1][R]=y[1][R]||0;for(O=0;O<p;O++){if(o.__excludes&&o.__excludes[O]){continue}L=F.get(x[O]);y[+(L>0)][R]+=n(L)}}y[+(r>0)].push(n(r));y[+(H>0)].push(n(H));g=k.apply(w,y[0]);d=k.apply(w,y[1]);B=(K?q.height-P.height:q.width-P.width)/(d+g);a=a+g*B*(K?-1:1)}else{if(H/r<0){a=a-H*B*(K?-1:1)}}if(o.boundColumn){u=T.axes.get(I.xAxis);if(u){Q=u.applyData();J=Q.from;t=Q.to}if(o.xField&&!Ext.isNumber(J)){G=o.getMinMaxYValues();J=G[0];t=G[1]}if(!Ext.isNumber(J)){J=0}if(!Ext.isNumber(t)){t=0}s=o.getGutters();M=(q.width-(s.lower+s.upper))/((t-J)||1);h=q.x+s.lower;l=[];for(R=0,z=S.length;R<z;R++){F=S[R];L=F.get(o.xField);l[R]=h+(L-J)*M-(e/2)}}return{bars:x,barsLoc:l,bbox:q,shrunkBarWidth:E,barsLen:p,groupBarsLen:m,barWidth:v,groupBarWidth:e,scale:B,zero:a,padding:P,signed:H/r<0,minY:H,maxY:r}},getPaths:function(){var u=this,Z=u.chart,b=Z.getChartStore(),Y=b.data.items,W,E,L,G=u.bounds=u.getBounds(),y=u.items=[],P=Ext.isArray(u.yField)?u.yField:[u.yField],m=u.gutter/100,c=u.groupGutter/100,T=Z.animate,N=u.column,w=u.group,n=Z.shadow,R=u.shadowGroups,Q=u.shadowAttributes,q=R.length,x=G.bbox,A=G.barWidth,K=G.shrunkBarWidth,V=u.getPadding(),S=u.stacked,v=G.barsLen,O=u.colorArrayStyle,k=O&&O.length||0,h=u.themeIdx,B=Math,o=B.max,I=B.min,t=B.abs,U,aa,e,J,D,a,l,s,r,p,g,ab,C,d,F,z,M,H,X;for(W=0,E=Y.length;W<E;W++){L=Y[W];a=G.zero;l=G.zero;J=0;D=0;ab=C=0;s=false;for(U=0,g=0;U<v;U++){if(u.__excludes&&u.__excludes[U]){continue}aa=L.get(G.bars[U]);if(aa>=0){ab+=aa}else{C+=aa}e=Math.round((aa-o(G.minY,0))*G.scale);X=h+(v>1?U:0);r={fill:O[X%k]};if(N){Ext.apply(r,{height:e,width:o(G.groupBarWidth,0),x:(u.boundColumn?G.barsLoc[W]:(x.x+V.left+(A-K)*0.5+W*A*(1+m)+g*G.groupBarWidth*(1+c)*!S)),y:a-e})}else{M=(E-1)-W;Ext.apply(r,{height:o(G.groupBarWidth,0),width:e+(a==G.zero),x:a+(a!=G.zero),y:(x.y+V.top+(A-K)*0.5+M*A*(1+m)+g*G.groupBarWidth*(1+c)*!S+1)})}if(e<0){if(N){r.y=l;r.height=t(e)}else{r.x=l+e;r.width=t(e)}}if(S){if(e<0){l+=e*(N?-1:1)}else{a+=e*(N?-1:1)}J+=t(e);if(e<0){D+=t(e)}}r.x=Math.floor(r.x)+1;H=Math.floor(r.y);if(Ext.isIE8m&&r.y>H){H--}r.y=H;r.width=Math.floor(r.width);r.height=Math.floor(r.height);y.push({series:u,yField:P[U],storeItem:L,value:[L.get(u.xField),aa],attr:r,point:N?[r.x+r.width/2,aa>=0?r.y:r.y+r.height]:[aa>=0?r.x+r.width:r.x,r.y+r.height/2]});if(T&&Z.resizing){p=N?{x:r.x,y:G.zero,width:r.width,height:0}:{x:G.zero,y:r.y,width:0,height:r.height};if(n&&(S&&!s||!S)){s=true;for(d=0;d<q;d++){F=R[d].getAt(S?W:(W*v+U));if(F){F.setAttributes(p,true)}}}z=w.getAt(W*v+U);if(z){z.setAttributes(p,true)}}g++}if(S&&y.length){y[W*g].totalDim=J;y[W*g].totalNegDim=D;y[W*g].totalPositiveValues=ab;y[W*g].totalNegativeValues=C}}if(S&&g==0){for(W=0,E=Y.length;W<E;W++){for(d=0;d<q;d++){F=R[d].getAt(W);if(F){F.hide(true)}}}}},renderShadows:function(u,v,y,l){var z=this,p=z.chart,s=p.surface,g=p.animate,x=z.stacked,a=z.shadowGroups,w=z.shadowAttributes,o=a.length,h=p.getChartStore(),d=z.column,r=z.items,b=[],m=l.zero,e,q,k,A,n,t,c;if((x&&(u%l.groupBarsLen===0))||!x){t=u/l.groupBarsLen;for(e=0;e<o;e++){q=Ext.apply({},w[e]);k=a[e].getAt(x?t:u);Ext.copyTo(q,v,"x,y,width,height");if(!k){k=s.add(Ext.apply({type:"rect",group:a[e]},Ext.apply({},y,q)))}if(x){A=r[u].totalDim;n=r[u].totalNegDim;if(d){q.y=m+n-A-1;q.height=A}else{q.x=m-n;q.width=A}}c=z.renderer(k,h.getAt(t),q,u,h);c.hidden=!!v.hidden;if(g){z.onAnimate(k,{to:c})}else{k.setAttributes(c,true)}b.push(k)}}return b},drawSeries:function(){var G=this,s=G.chart,m=s.getChartStore(),x=s.surface,k=s.animate,D=G.stacked,d=G.column,E=s.axes,y=G.getAxesForXAndYFields(),w=y.xAxis,n=y.yAxis,b=s.shadow,a=G.shadowGroups,r=a.length,p=G.group,g=G.seriesStyle,t,q,B,A,F,u,c,e,h,o,l,C,v,z;if(!m||!m.getCount()||G.seriesIsHidden){G.hide();G.items=[];return}l=Ext.apply({},this.style,g);delete l.fill;delete l.x;delete l.y;delete l.width;delete l.height;G.unHighlightItem();G.cleanHighlights();G.boundColumn=(w&&Ext.Array.contains(G.axis,w)&&E.get(w)&&E.get(w).isNumericAxis);G.getPaths();o=G.bounds;t=G.items;F=d?{y:o.zero,height:0}:{x:o.zero,width:0};q=t.length;for(B=0;B<q;B++){u=p.getAt(B);C=t[B].attr;if(b){t[B].shadows=G.renderShadows(B,C,F,o)}if(!u){v=Ext.apply({},F,C);v=Ext.apply(v,l||{});u=x.add(Ext.apply({},{type:"rect",group:p},v))}if(k){c=G.renderer(u,m.getAt(B),C,B,m);u._to=c;z=G.onAnimate(u,{to:Ext.apply(c,l)});if(b&&D&&(B%o.barsLen===0)){A=B/o.barsLen;for(e=0;e<r;e++){z.on("afteranimate",function(){this.show(true)},a[e].getAt(A))}}}else{c=G.renderer(u,m.getAt(B),Ext.apply(C,{hidden:false}),B,m);u.setAttributes(Ext.apply(c,l),true)}t[B].sprite=u}q=p.getCount();for(A=B;A<q;A++){p.getAt(A).hide(true)}if(G.stacked){B=m.getCount()}if(b){for(e=0;e<r;e++){h=a[e];q=h.getCount();for(A=B;A<q;A++){h.getAt(A).hide(true)}}}G.renderLabels()},onCreateLabel:function(e,l,d,g){var h=this,a=h.chart.surface,k=h.labelsGroup,b=h.label,c=Ext.apply({},b,h.seriesLabelStyle||{}),j;return a.add(Ext.apply({type:"text",group:k},c||{}))},onPlaceLabel:function(J,Q,t,M,q,L,w){var m=this,n=m.bounds,d=n.groupBarWidth,I=m.column,O=m.chart,v=O.chartBBox,D=O.resizing,p=t.value[0],R=t.value[1],l=t.attr,B=m.label,K=m.stacked,h=B.stackedDisplay,N=(B.orientation=="vertical"),j=[].concat(B.field),u=B.renderer,s,g,a,c,b=n.zero,r="insideStart",P="insideEnd",k="outside",G="over",o="under",H=4,F=2,e=n.signed,E,C,A;if(q==r||q==P||q==k){if(K&&(q==k)){J.hide(true);return}J.setAttributes({style:undefined});s=(Ext.isNumber(w)?u(Q.get(j[w]),J,Q,t,M,q,L,w):"");J.setAttributes({text:s});g=m.getLabelSize(s,J.attr.style);a=g.width;c=g.height;if(I){if(!a||!c||(K&&(l.height<c))){J.hide(true);return}E=l.x+(N?d/2:(d-a)/2);if(q==k){var z=(R>=0?(l.y-v.y):(v.y+v.height-l.y-l.height));if(z<c+F){q=P}}if(!K&&(q!=k)){if(c+F>l.height){q=k}}if(!C){C=l.y;if(R>=0){switch(q){case r:C+=l.height+(N?-F:-c/2);break;case P:C+=(N?c+H:c/2);break;case k:C+=(N?-F:-c/2);break}}else{switch(q){case r:C+=(N?c+F:c/2);break;case P:C+=(N?l.height-F:l.height-c/2);break;case k:C+=(N?l.height+c+F:l.height+c/2);break}}}}else{if(!a||!c||(K&&!l.width)){J.hide(true);return}C=l.y+(N?(d+c)/2:d/2);if(q==k){var z=(R>=0?(v.x+v.width-l.x-l.width):(l.x-v.x));if(z<a+H){q=P}}if((q!=k)&&!N){if(a+H>l.width){if(K){if(c>l.width){J.hide(true);return}E=l.x+l.width/2;C=l.y+l.height-(l.height-a)/2;N=true}else{q=k}}}if(!E){E=l.x;if(R>=0){switch(q){case r:E+=(N?a/2:H);break;case P:E+=l.width+(N?-a/2:-a-H);break;case k:E+=l.width+(N?a/2:H);break}}else{switch(q){case r:E+=l.width+(N?-a/2:-a-H);break;case P:E+=(N?a/2:H);break;case k:E+=(N?-a/2:-a-H);break}}}}}else{if(q==G||q==o){if(K&&h){s=J.attr.text;J.setAttributes({style:Ext.applyIf((J.attr&&J.attr.style)||{},{"font-weight":"bold","font-size":"14px"})});g=m.getLabelSize(s,J.attr.style);a=g.width;c=g.height;switch(q){case G:if(I){E=l.x+(N?d/2:(d-a)/2);C=b-(t.totalDim-t.totalNegDim)-c/2-F}else{E=b+(t.totalDim-t.totalNegDim)+H;C=l.y+(N?(d+c)/2:d/2)}break;case o:if(I){E=l.x+(N?d/2:(d-a)/2);C=b+t.totalNegDim+c/2}else{E=b-t.totalNegDim-a-H;C=l.y+(N?(d+c)/2:d/2)}break}}}}if(E==undefined||C==undefined){J.hide(true);return}J.isOutside=(q==k);J.setAttributes({text:s});A={x:E,y:C};if(N){A.rotate={x:E,y:C,degrees:270}}if(L&&D){if(I){E=l.x+l.width/2;C=b}else{E=b;C=l.y+l.height/2}J.setAttributes({x:E,y:C},true);if(N){J.setAttributes({rotate:{x:E,y:C,degrees:270}},true)}}if(L){m.onAnimate(J,{to:A})}else{J.setAttributes(Ext.apply(A,{hidden:false}),true)}},getLabelSize:function(i,g){var l=this.testerLabel,a=this.label,d=Ext.apply({},a,g,this.seriesLabelStyle||{}),b=a.orientation==="vertical",k,j,e,c;if(!l){l=this.testerLabel=this.chart.surface.add(Ext.apply({type:"text",opacity:0},d))}l.setAttributes({style:g,text:i},true);k=l.getBBox();j=k.width;e=k.height;return{width:b?e:j,height:b?j:e}},onAnimate:function(b,a){b.show();return this.callParent(arguments)},isItemInPoint:function(a,d,b){var c=b.sprite.getBBox();return c.x<=a&&c.y<=d&&(c.x+c.width)>=a&&(c.y+c.height)>=d},hideAll:function(a){var e=this.chart.axes,c=e.items,d=c.length,b=0;a=(isNaN(this._index)?a:this._index)||0;if(!this.__excludes){this.__excludes=[]}this.__excludes[a]=true;this.drawSeries();for(b;b<d;b++){c[b].drawAxis()}},showAll:function(a){var e=this.chart.axes,c=e.items,d=c.length,b=0;a=(isNaN(this._index)?a:this._index)||0;if(!this.__excludes){this.__excludes=[]}this.__excludes[a]=false;this.drawSeries();for(b;b<d;b++){c[b].drawAxis()}},getLegendColor:function(a){var c=this,b=c.colorArrayStyle.length;if(c.style&&c.style.fill){return c.style.fill}else{return c.colorArrayStyle[a%b]}},highlightItem:function(a){this.callParent(arguments);this.renderLabels()},unHighlightItem:function(){this.callParent(arguments);this.renderLabels()},cleanHighlights:function(){this.callParent(arguments);this.renderLabels()}});Ext.define("Ext.chart.series.Column",{alternateClassName:["Ext.chart.ColumnSeries","Ext.chart.ColumnChart","Ext.chart.StackedColumnChart"],extend:Ext.chart.series.Bar,type:"column",alias:"series.column",column:true,boundColumn:false,xPadding:10,yPadding:0});Ext.define("Ext.chart.series.Gauge",{extend:Ext.chart.series.Series,type:"gauge",alias:"series.gauge",rad:Math.PI/180,highlightDuration:150,angleField:false,needle:false,donut:false,showInLegend:false,style:{},constructor:function(b){this.callParent(arguments);var h=this,g=h.chart,a=g.surface,j=g.store,k=g.shadow,d,c,e;Ext.apply(h,b,{shadowAttributes:[{"stroke-width":6,"stroke-opacity":1,stroke:"rgb(200, 200, 200)",translate:{x:1.2,y:2}},{"stroke-width":4,"stroke-opacity":1,stroke:"rgb(150, 150, 150)",translate:{x:0.9,y:1.5}},{"stroke-width":2,"stroke-opacity":1,stroke:"rgb(100, 100, 100)",translate:{x:0.6,y:1}}]});h.group=a.getGroup(h.seriesId);if(k){for(d=0,c=h.shadowAttributes.length;d<c;d++){h.shadowGroups.push(a.getGroup(h.seriesId+"-shadows"+d))}}a.customAttributes.segment=function(i){return h.getSegment(i)}},initialize:function(){var d=this,a=d.chart.getChartStore(),e=a.data.items,b=d.label,c=e.length;d.yField=[];if(b&&b.field&&c>0){d.yField.push(e[0].get(b.field))}},getSegment:function(b){var C=this,B=C.rad,d=Math.cos,a=Math.sin,n=Math.abs,k=C.centerX,i=C.centerY,w=0,v=0,u=0,s=0,h=0,g=0,e=0,c=0,z=0.01,m=b.endRho-b.startRho,q=b.startAngle,p=b.endAngle,j=(q+p)/2*B,l=b.margin||0,t=n(p-q)>180,D=Math.min(q,p)*B,A=Math.max(q,p)*B,o=false;k+=l*d(j);i+=l*a(j);w=k+b.startRho*d(D);h=i+b.startRho*a(D);v=k+b.endRho*d(D);g=i+b.endRho*a(D);u=k+b.startRho*d(A);e=i+b.startRho*a(A);s=k+b.endRho*d(A);c=i+b.endRho*a(A);if(n(w-u)<=z&&n(h-e)<=z){o=true}if(o){return{path:[["M",w,h],["L",v,g],["A",b.endRho,b.endRho,0,+t,1,s,c],["Z"]]}}else{return{path:[["M",w,h],["L",v,g],["A",b.endRho,b.endRho,0,+t,1,s,c],["L",u,e],["A",b.startRho,b.startRho,0,+t,0,w,h],["Z"]]}}},calcMiddle:function(p){var k=this,l=k.rad,o=p.slice,n=k.centerX,m=k.centerY,j=o.startAngle,e=o.endAngle,i=Math.max(("rho" in o)?o.rho:k.radius,k.label.minMargin),h=+k.donut,b=Math.min(j,e)*l,a=Math.max(j,e)*l,d=-(b+(a-b)/2),g=n+(p.endRho+p.startRho)/2*Math.cos(d),c=m-(p.endRho+p.startRho)/2*Math.sin(d);p.middle={x:g,y:c}},drawSeries:function(){var w=this,U=w.chart,b=U.getChartStore(),A=w.group,Q=w.chart.animate,D=w.chart.axes.get(0),E=D&&D.minimum||w.minimum||0,I=D&&D.maximum||w.maximum||0,n=w.angleField||w.field||w.xField,K=U.surface,H=U.chartBBox,h=w.rad,c=+w.donut,V={},B=[],m=w.seriesStyle,a=w.seriesLabelStyle,g=w.colorArrayStyle,z=g&&g.length||0,k=Math.cos,s=Math.sin,t,e,d,v,r,C,M,F,G,J,S,R,l,T,x,o,O,P,q,y,u,N,L;Ext.apply(m,w.style||{});w.setBBox();y=w.bbox;if(w.colorSet){g=w.colorSet;z=g.length}if(!b||!b.getCount()||w.seriesIsHidden){w.hide();w.items=[];return}e=w.centerX=H.x+(H.width/2);d=w.centerY=H.y+H.height;w.radius=Math.min(e-H.x,d-H.y);w.slices=r=[];w.items=B=[];if(!w.value){J=b.getAt(0);w.value=J.get(n)}M=w.value;if(w.needle){N={series:w,value:M,startAngle:-180,endAngle:0,rho:w.radius};u=-180*(1-(M-E)/(I-E));r.push(N)}else{u=-180*(1-(M-E)/(I-E));N={series:w,value:M,startAngle:-180,endAngle:u,rho:w.radius};L={series:w,value:w.maximum-M,startAngle:u,endAngle:0,rho:w.radius};r.push(N,L)}for(S=0,G=r.length;S<G;S++){v=r[S];C=A.getAt(S);t=Ext.apply({segment:{startAngle:v.startAngle,endAngle:v.endAngle,margin:0,rho:v.rho,startRho:v.rho*+c/100,endRho:v.rho}},Ext.apply(m,g&&{fill:g[S%z]}||{}));F=Ext.apply({},t.segment,{slice:v,series:w,storeItem:J,index:S});B[S]=F;if(!C){q=Ext.apply({type:"path",group:A},Ext.apply(m,g&&{fill:g[S%z]}||{}));C=K.add(Ext.apply(q,t))}v.sprite=v.sprite||[];F.sprite=C;v.sprite.push(C);if(Q){t=w.renderer(C,J,t,S,b);C._to=t;w.onAnimate(C,{to:t})}else{t=w.renderer(C,J,Ext.apply(t,{hidden:false}),S,b);C.setAttributes(t,true)}}if(w.needle){u=u*Math.PI/180;if(!w.needleSprite){w.needleSprite=w.chart.surface.add({type:"path",path:["M",e+(w.radius*+c/100)*k(u),d+-Math.abs((w.radius*+c/100)*s(u)),"L",e+w.radius*k(u),d+-Math.abs(w.radius*s(u))],"stroke-width":4,stroke:"#222"})}else{if(Q){w.onAnimate(w.needleSprite,{to:{path:["M",e+(w.radius*+c/100)*k(u),d+-Math.abs((w.radius*+c/100)*s(u)),"L",e+w.radius*k(u),d+-Math.abs(w.radius*s(u))]}})}else{w.needleSprite.setAttributes({type:"path",path:["M",e+(w.radius*+c/100)*k(u),d+-Math.abs((w.radius*+c/100)*s(u)),"L",e+w.radius*k(u),d+-Math.abs(w.radius*s(u))]})}}w.needleSprite.setAttributes({hidden:false},true)}delete w.value},setValue:function(a){this.value=a;this.drawSeries()},onCreateLabel:function(c,b,a,d){},onPlaceLabel:function(c,g,e,d,h,a,b){},onPlaceCallout:function(){},onAnimate:function(b,a){b.show();return this.callParent(arguments)},isItemInPoint:function(l,j,n,e){var h=this,d=h.centerX,c=h.centerY,p=Math.abs,o=p(l-d),m=p(j-c),g=n.startAngle,a=n.endAngle,k=Math.sqrt(o*o+m*m),b=Math.atan2(j-c,l-d)/h.rad;return(e===0)&&(b>=g&&b<a&&k>=n.startRho&&k<=n.endRho)},getLegendColor:function(b){var a=this.colorSet||this.colorArrayStyle;return a[b%a.length]}});Ext.define("Ext.chart.series.Line",{extend:Ext.chart.series.Cartesian,alternateClassName:["Ext.chart.LineSeries","Ext.chart.LineChart"],type:"line",alias:"series.line",selectionTolerance:20,showMarkers:true,markerConfig:{},style:{},smooth:false,defaultSmoothness:3,fill:false,constructor:function(c){this.callParent(arguments);var e=this,a=e.chart.surface,g=e.chart.shadow,d,b;c.highlightCfg=Ext.Object.merge({"stroke-width":3},c.highlightCfg);Ext.apply(e,c,{shadowAttributes:[{"stroke-width":6,"stroke-opacity":0.05,stroke:"rgb(0, 0, 0)",translate:{x:1,y:1}},{"stroke-width":4,"stroke-opacity":0.1,stroke:"rgb(0, 0, 0)",translate:{x:1,y:1}},{"stroke-width":2,"stroke-opacity":0.15,stroke:"rgb(0, 0, 0)",translate:{x:1,y:1}}]});e.group=a.getGroup(e.seriesId);if(e.showMarkers){e.markerGroup=a.getGroup(e.seriesId+"-markers")}if(g){for(d=0,b=e.shadowAttributes.length;d<b;d++){e.shadowGroups.push(a.getGroup(e.seriesId+"-shadows"+d))}}},shrink:function(b,k,l){var h=b.length,j=Math.floor(h/l),g=1,d=0,a=0,e=[+b[0]],c=[+k[0]];for(;g<h;++g){d+=+b[g]||0;a+=+k[g]||0;if(g%j==0){e.push(d/j);c.push(a/j);d=0;a=0}}return{x:e,y:c}},drawSeries:function(){var ap=this,aC=ap.chart,W=aC.axes,ax=aC.getChartStore(),B=ax.data.items,au,Z=ax.getCount(),z=ap.chart.surface,aw={},V=ap.group,O=ap.showMarkers,aI=ap.markerGroup,H=aC.shadow,G=ap.shadowGroups,ac=ap.shadowAttributes,S=ap.smooth,s=G.length,aA=["M"],X=["M"],d=["M"],b=["M"],N=aC.markerIndex,ao=[].concat(ap.axis),an,aD=[],am={},ag=[],A={},M=false,U=[],aH=Ext.apply({},ap.markerStyle),af=ap.seriesStyle,w=ap.colorArrayStyle,T=w&&w.length||0,P=Ext.isNumber,aE=ap.seriesIdx,k=ap.getAxesForXAndYFields(),n=k.xAxis,aG=k.yAxis,ae=n?W.get(n).type:"",e=aG?W.get(aG).type:"",ai,l,ah,aj,E,c,ak,L,K,h,g,v,t,ab,R,Q,aB,o,J,I,aJ,p,r,F,a,ad,al,D,az,C,ay,q,aF,av,at,Y,m,u,aq,ar,aa;if(ap.fireEvent("beforedraw",ap)===false){return}if(!Z||ap.seriesIsHidden){ap.hide();ap.items=[];if(ap.line){ap.line.hide(true);if(ap.line.shadows){ai=ap.line.shadows;for(Q=0,s=ai.length;Q<s;Q++){l=ai[Q];l.hide(true)}}if(ap.fillPath){ap.fillPath.hide(true)}}ap.line=null;ap.fillPath=null;return}av=Ext.apply(aH||{},ap.markerConfig,{fill:ap.seriesStyle.fill||w[ap.themeIdx%w.length]});Y=av.type;delete av.type;at=af;if(!at["stroke-width"]){at["stroke-width"]=0.5}u="opacity" in at?at.opacity:1;aa="opacity" in at?at.opacity:0.3;aq="lineOpacity" in at?at.lineOpacity:u;ar="fillOpacity" in at?at.fillOpacity:aa;if(N&&aI&&aI.getCount()){for(R=0;R<N;R++){I=aI.getAt(R);aI.remove(I);aI.add(I);aJ=aI.getAt(aI.getCount()-2);I.setAttributes({x:0,y:0,translate:{x:aJ.attr.translation.x,y:aJ.attr.translation.y}},true)}}ap.unHighlightItem();ap.cleanHighlights();ap.setBBox();aw=ap.bbox;ap.clipRect=[aw.x,aw.y,aw.width,aw.height];if(o=W.get(n)){J=o.applyData();D=J.from;az=J.to}if(o=W.get(aG)){J=o.applyData();C=J.from;ay=J.to}if(ap.xField&&!Ext.isNumber(D)){o=ap.getMinMaxXValues();D=o[0];az=o[1]}if(ap.yField&&!Ext.isNumber(C)){o=ap.getMinMaxYValues();C=o[0];ay=o[1]}if(isNaN(D)){D=0;ad=aw.width/((Z-1)||1)}else{ad=aw.width/((az-D)||(Z-1)||1)}if(isNaN(C)){C=0;al=aw.height/((Z-1)||1)}else{al=aw.height/((ay-C)||(Z-1)||1)}for(R=0,aB=B.length;R<aB;R++){au=B[R];r=au.get(ap.xField);if(ae=="Time"&&typeof r=="string"){r=Date.parse(r)}if(typeof r=="string"||typeof r=="object"&&!Ext.isDate(r)||n&&W.get(n)&&W.get(n).type=="Category"){if(r in am){r=am[r]}else{r=am[r]=R}}F=au.get(ap.yField);if(e=="Time"&&typeof F=="string"){F=Date.parse(F)}if(typeof F=="undefined"||(typeof F=="string"&&!F)){continue}if(typeof F=="string"||typeof F=="object"&&!Ext.isDate(F)||aG&&W.get(aG)&&W.get(aG).type=="Category"){F=R}U.push(R);aD.push(r);ag.push(F)}aB=aD.length;if(aB>aw.width){a=ap.shrink(aD,ag,aw.width);aD=a.x;ag=a.y}ap.items=[];m=0;aB=aD.length;for(R=0;R<aB;R++){r=aD[R];F=ag[R];if(F===false){if(X.length==1){X=[]}M=true;ap.items.push(false);continue}else{L=(aw.x+(r-D)*ad).toFixed(2);K=((aw.y+aw.height)-(F-C)*al).toFixed(2);if(M){M=false;X.push("M")}X=X.concat([L,K])}if((typeof t=="undefined")&&(typeof K!="undefined")){t=K;v=L}if(!ap.line||aC.resizing){aA=aA.concat([L,aw.y+aw.height/2])}if(aC.animate&&aC.resizing&&ap.line){ap.line.setAttributes({path:aA,opacity:aq},true);if(ap.fillPath){ap.fillPath.setAttributes({path:aA,opacity:ar},true)}if(ap.line.shadows){ai=ap.line.shadows;for(Q=0,s=ai.length;Q<s;Q++){l=ai[Q];l.setAttributes({path:aA},true)}}}if(O){I=aI.getAt(m++);if(!I){I=Ext.chart.Shape[Y](z,Ext.apply({group:[V,aI],x:0,y:0,translate:{x:+(h||L),y:g||(aw.y+aw.height/2)},value:'"'+r+", "+F+'"',zIndex:4000},av));I._to={translate:{x:+L,y:+K}}}else{I.setAttributes({value:'"'+r+", "+F+'"',x:0,y:0,hidden:false},true);I._to={translate:{x:+L,y:+K}}}}ap.items.push({series:ap,value:[r,F],point:[L,K],sprite:I,storeItem:ax.getAt(U[R])});h=L;g=K}if(X.length<=1){return}if(ap.smooth){b=Ext.draw.Draw.smooth(X,P(S)?S:ap.defaultSmoothness)}d=S?b:X;if(aC.markerIndex&&ap.previousPath){aj=ap.previousPath;if(!S){Ext.Array.erase(aj,1,2)}}else{aj=X}if(!ap.line){ap.line=z.add(Ext.apply({type:"path",group:V,path:aA,stroke:at.stroke||at.fill},at||{}));ap;ap.line.setAttributes({opacity:aq},true);if(H){ap.line.setAttributes(Ext.apply({},ap.shadowOptions),true)}ap.line.setAttributes({fill:"none",zIndex:3000});if(!at.stroke&&T){ap.line.setAttributes({stroke:w[ap.themeIdx%T]},true)}if(H){ai=ap.line.shadows=[];for(ah=0;ah<s;ah++){an=ac[ah];an=Ext.apply({},an,{path:aA});l=z.add(Ext.apply({},{type:"path",group:G[ah]},an));ai.push(l)}}}if(ap.fill){c=d.concat([["L",L,aw.y+aw.height],["L",v,aw.y+aw.height],["L",v,t]]);if(!ap.fillPath){ap.fillPath=z.add({group:V,type:"path",fill:at.fill||w[ap.themeIdx%T],path:aA})}}ab=O&&aI.getCount();if(aC.animate){E=ap.fill;q=ap.line;ak=ap.renderer(q,false,{path:d},R,ax);Ext.apply(ak,at||{},{stroke:at.stroke||at.fill});delete ak.fill;q.show(true);if(aC.markerIndex&&ap.previousPath){ap.animation=aF=ap.onAnimate(q,{to:ak,from:{path:aj}})}else{ap.animation=aF=ap.onAnimate(q,{to:ak})}if(H){ai=q.shadows;for(Q=0;Q<s;Q++){ai[Q].show(true);if(aC.markerIndex&&ap.previousPath){ap.onAnimate(ai[Q],{to:{path:d},from:{path:aj}})}else{ap.onAnimate(ai[Q],{to:{path:d}})}}}if(E){ap.fillPath.show(true);ap.onAnimate(ap.fillPath,{to:Ext.apply({},{path:c,fill:at.fill||w[ap.themeIdx%T],"stroke-width":0,opacity:ar},at||{})})}if(O){m=0;for(R=0;R<aB;R++){if(ap.items[R]){p=aI.getAt(m++);if(p){ak=ap.renderer(p,ax.getAt(R),p._to,R,ax);ap.onAnimate(p,{to:Ext.applyIf(ak,av||{})});p.show(true)}}}for(;m<ab;m++){p=aI.getAt(m);p.hide(true)}}}else{ak=ap.renderer(ap.line,false,{path:d,hidden:false},R,ax);Ext.apply(ak,at||{},{stroke:at.stroke||at.fill});delete ak.fill;ap.line.setAttributes(ak,true);ap.line.setAttributes({opacity:aq},true);if(H){ai=ap.line.shadows;for(Q=0;Q<s;Q++){ai[Q].setAttributes({path:d,hidden:false},true)}}if(ap.fill){ap.fillPath.setAttributes({path:c,hidden:false,opacity:ar},true)}if(O){m=0;for(R=0;R<aB;R++){if(ap.items[R]){p=aI.getAt(m++);if(p){ak=ap.renderer(p,ax.getAt(R),p._to,R,ax);p.setAttributes(Ext.apply(av||{},ak||{}),true);if(!p.attr.hidden){p.show(true)}}}}for(;m<ab;m++){p=aI.getAt(m);p.hide(true)}}}if(aC.markerIndex){if(ap.smooth){Ext.Array.erase(X,1,2)}else{Ext.Array.splice(X,1,0,X[1],X[2])}ap.previousPath=X}ap.renderLabels();ap.renderCallouts();ap.fireEvent("draw",ap)},onCreateLabel:function(d,k,c,e){var g=this,h=g.labelsGroup,a=g.label,j=g.bbox,b=Ext.apply(a,g.seriesLabelStyle);return g.chart.surface.add(Ext.apply({type:"text","text-anchor":"middle",group:h,x:k.point[0],y:j.y+j.height/2},b||{}))},onPlaceLabel:function(h,l,t,q,p,d,g){var v=this,m=v.chart,s=m.resizing,u=v.label,r=u.renderer,b=u.field,a=v.bbox,k=t.point[0],j=t.point[1],c=t.sprite.attr.radius,e,o,n;h.setAttributes({text:r(l.get(b),h,l,t,q,p,d,g),hidden:true},true);if(p=="rotate"){h.setAttributes({"text-anchor":"start",rotation:{x:k,y:j,degrees:-45}},true);e=h.getBBox();o=e.width;n=e.height;k=k<a.x?a.x:k;k=(k+o>a.x+a.width)?(k-(k+o-a.x-a.width)):k;j=(j-n<a.y)?a.y+n:j}else{if(p=="under"||p=="over"){e=t.sprite.getBBox();e.width=e.width||(c*2);e.height=e.height||(c*2);j=j+(p=="over"?-e.height:e.height);e=h.getBBox();o=e.width/2;n=e.height/2;k=k-o<a.x?a.x+o:k;k=(k+o>a.x+a.width)?(k-(k+o-a.x-a.width)):k;j=j-n<a.y?a.y+n:j;j=(j+n>a.y+a.height)?(j-(j+n-a.y-a.height)):j}}if(v.chart.animate&&!v.chart.resizing){h.show(true);v.onAnimate(h,{to:{x:k,y:j}})}else{h.setAttributes({x:k,y:j},true);if(s&&v.animation){v.animation.on("afteranimate",function(){h.show(true)})}else{h.show(true)}}},highlightItem:function(){var b=this,a=b.line;b.callParent(arguments);if(a&&!b.highlighted){if(!("__strokeWidth" in a)){a.__strokeWidth=parseFloat(a.attr["stroke-width"])||0}if(a.__anim){a.__anim.paused=true}a.__anim=new Ext.fx.Anim({target:a,to:{"stroke-width":a.__strokeWidth+3}});b.highlighted=true}},unHighlightItem:function(){var c=this,a=c.line,b;c.callParent(arguments);if(a&&c.highlighted){b=a.__strokeWidth||parseFloat(a.attr["stroke-width"])||0;a.__anim=new Ext.fx.Anim({target:a,to:{"stroke-width":b}});c.highlighted=false}},onPlaceCallout:function(m,r,J,G,F,d,k){if(!F){return}var M=this,s=M.chart,D=s.surface,H=s.resizing,L=M.callouts,t=M.items,v=G==0?false:t[G-1].point,z=(G==t.length-1)?false:t[G+1].point,c=[+J.point[0],+J.point[1]],A,g,N,K,o,q,I=L.offsetFromViz||30,C=L.offsetToSide||10,B=L.offsetBox||3,h,e,j,w,u,E=M.clipRect,b={width:L.styles.width||10,height:L.styles.height||10},n,l;if(!v){v=c}if(!z){z=c}K=(z[1]-v[1])/(z[0]-v[0]);o=(c[1]-v[1])/(c[0]-v[0]);q=(z[1]-c[1])/(z[0]-c[0]);g=Math.sqrt(1+K*K);A=[1/g,K/g];N=[-A[1],A[0]];if(o>0&&q<0&&N[1]<0||o<0&&q>0&&N[1]>0){N[0]*=-1;N[1]*=-1}else{if(Math.abs(o)<Math.abs(q)&&N[0]<0||Math.abs(o)>Math.abs(q)&&N[0]>0){N[0]*=-1;N[1]*=-1}}n=c[0]+N[0]*I;l=c[1]+N[1]*I;h=n+(N[0]>0?0:-(b.width+2*B));e=l-b.height/2-B;j=b.width+2*B;w=b.height+2*B;if(h<E[0]||(h+j)>(E[0]+E[2])){N[0]*=-1}if(e<E[1]||(e+w)>(E[1]+E[3])){N[1]*=-1}n=c[0]+N[0]*I;l=c[1]+N[1]*I;h=n+(N[0]>0?0:-(b.width+2*B));e=l-b.height/2-B;j=b.width+2*B;w=b.height+2*B;if(s.animate){M.onAnimate(m.lines,{to:{path:["M",c[0],c[1],"L",n,l,"Z"]}});if(m.panel){m.panel.setPosition(h,e,true)}}else{m.lines.setAttributes({path:["M",c[0],c[1],"L",n,l,"Z"]},true);if(m.panel){m.panel.setPosition(h,e)}}for(u in m){m[u].show(true)}},isItemInPoint:function(j,g,A,q){var C=this,n=C.items,s=C.selectionTolerance,k=null,z,c,p,v,h,w,b,t,a,l,B,e,d,o,u,r,D=Math.sqrt,m=Math.abs;c=n[q];z=q&&n[q-1];if(q>=h){z=n[h-1]}p=z&&z.point;v=c&&c.point;w=z?p[0]:v[0]-s;b=z?p[1]:v[1];t=c?v[0]:p[0]+s;a=c?v[1]:p[1];e=D((j-w)*(j-w)+(g-b)*(g-b));d=D((j-t)*(j-t)+(g-a)*(g-a));o=Math.min(e,d);if(o<=s){return o==e?z:c}return false},toggleAll:function(a){var e=this,b,d,g,c;if(!a){Ext.chart.series.Cartesian.prototype.hideAll.call(e)}else{Ext.chart.series.Cartesian.prototype.showAll.call(e)}if(e.line){e.line.setAttributes({hidden:!a},true);if(e.line.shadows){for(b=0,c=e.line.shadows,d=c.length;b<d;b++){g=c[b];g.setAttributes({hidden:!a},true)}}}if(e.fillPath){e.fillPath.setAttributes({hidden:!a},true)}},hideAll:function(){this.toggleAll(false)},showAll:function(){this.toggleAll(true)}});Ext.define("Ext.chart.series.Pie",{alternateClassName:["Ext.chart.PieSeries","Ext.chart.PieChart"],extend:Ext.chart.series.Series,type:"pie",alias:"series.pie",accuracy:100000,rad:Math.PI*2/100000,highlightDuration:150,angleField:false,lengthField:false,donut:false,showInLegend:false,style:{},constructor:function(b){this.callParent(arguments);var h=this,g=h.chart,a=g.surface,j=g.store,k=g.shadow,d,c,e;b.highlightCfg=Ext.merge({segment:{margin:20}},b.highlightCfg);Ext.apply(h,b,{shadowAttributes:[{"stroke-width":6,"stroke-opacity":1,stroke:"rgb(200, 200, 200)",translate:{x:1.2,y:2}},{"stroke-width":4,"stroke-opacity":1,stroke:"rgb(150, 150, 150)",translate:{x:0.9,y:1.5}},{"stroke-width":2,"stroke-opacity":1,stroke:"rgb(100, 100, 100)",translate:{x:0.6,y:1}}]});h.group=a.getGroup(h.seriesId);if(k){for(d=0,c=h.shadowAttributes.length;d<c;d++){h.shadowGroups.push(a.getGroup(h.seriesId+"-shadows"+d))}}a.customAttributes.segment=function(l){var i=h.getSegment(l);if(!i.path||i.path.length===0){i.path=["M",0,0]}return i};h.__excludes=h.__excludes||[]},onRedraw:function(){this.initialize()},initialize:function(){var d=this,a=d.chart.getChartStore(),e=a.data.items,b,c,g;d.yField=[];if(d.label.field){for(b=0,c=e.length;b<c;b++){g=e[b];d.yField.push(g.get(d.label.field))}}},getSegment:function(d){var J=this,I=J.rad,i=Math.cos,a=Math.sin,p=J.centerX,n=J.centerY,E=0,D=0,C=0,A=0,l=0,k=0,j=0,g=0,w=0,c=0,v=0,b=0,G=0.01,z=d.startAngle,u=d.endAngle,o=(z+u)/2*I,r=d.margin||0,K=Math.min(z,u)*I,H=Math.max(z,u)*I,t=i(K),h=a(K),s=i(H),e=a(H),m=i(o),F=a(o),B=0,q=0.7071067811865476;if(H-K<G){return{path:""}}if(r!==0){p+=r*m;n+=r*F}D=p+d.endRho*t;k=n+d.endRho*h;A=p+d.endRho*s;g=n+d.endRho*e;v=p+d.endRho*m;b=n+d.endRho*F;if(d.startRho!==0){E=p+d.startRho*t;l=n+d.startRho*h;C=p+d.startRho*s;j=n+d.startRho*e;w=p+d.startRho*m;c=n+d.startRho*F;return{path:[["M",D,k],["A",d.endRho,d.endRho,0,0,1,v,b],["L",v,b],["A",d.endRho,d.endRho,0,B,1,A,g],["L",A,g],["L",C,j],["A",d.startRho,d.startRho,0,B,0,w,c],["L",w,c],["A",d.startRho,d.startRho,0,0,0,E,l],["L",E,l],["Z"]]}}else{return{path:[["M",p,n],["L",D,k],["A",d.endRho,d.endRho,0,0,1,v,b],["L",v,b],["A",d.endRho,d.endRho,0,B,1,A,g],["L",A,g],["L",p,n],["Z"]]}}},calcMiddle:function(n){var i=this,j=i.rad,m=n.slice,l=i.centerX,k=i.centerY,h=m.startAngle,d=m.endAngle,g=+i.donut,c=-(h+d)*j/2,a=(n.endRho+n.startRho)/2,e=l+a*Math.cos(c),b=k-a*Math.sin(c);n.middle={x:e,y:b}},drawSeries:function(){var s=this,a=s.chart.getChartStore(),W=a.data.items,I,x=s.group,S=s.chart.animate,k=s.angleField||s.field||s.xField,A=[].concat(s.lengthField),R=0,X=s.chart,J=X.surface,G=X.chartBBox,g=X.shadow,Q=s.shadowGroups,P=s.shadowAttributes,aa=Q.length,K=A.length,B=0,b=+s.donut,Z=[],y=[],u=0,M=0,t=0,h=s.seriesStyle,e=s.colorArrayStyle,w=e&&e.length||0,o,Y,C,H,E,d,c,q,l=0,r,n,z,L,D,ab,F,U,T,V,N,O,m,v;Ext.apply(h,s.style||{});s.setBBox();v=s.bbox;if(s.colorSet){e=s.colorSet;w=e.length}if(!a||!a.getCount()||s.seriesIsHidden){s.hide();s.items=[];return}s.unHighlightItem();s.cleanHighlights();d=s.centerX=G.x+(G.width/2);c=s.centerY=G.y+(G.height/2);s.radius=Math.min(d-G.x,c-G.y);s.slices=n=[];s.items=y=[];for(U=0,F=W.length;U<F;U++){I=W[U];if(this.__excludes&&this.__excludes[U]){continue}u+=+I.get(k);if(A[0]){for(T=0,R=0;T<K;T++){R+=+I.get(A[T])}Z[U]=R;M=Math.max(M,R)}}u=u||1;for(U=0,F=W.length;U<F;U++){I=W[U];if(this.__excludes&&this.__excludes[U]){L=0}else{L=I.get(k);if(l==0){l=1}}if(l==1){l=2;s.firstAngle=t=s.accuracy*L/u/2;for(T=0;T<U;T++){n[T].startAngle=n[T].endAngle=s.firstAngle}}V=t-s.accuracy*L/u;r={series:s,value:L,startAngle:t,endAngle:V,storeItem:I};if(A[0]){ab=+Z[U];r.rho=Math.floor(s.radius/M*ab)}else{r.rho=s.radius}n[U]=r;(function(){t=V})()}if(g){for(U=0,F=n.length;U<F;U++){r=n[U];r.shadowAttrs=[];for(T=0,B=0,C=[];T<K;T++){z=x.getAt(U*K+T);q=A[T]?a.getAt(U).get(A[T])/Z[U]*r.rho:r.rho;o={segment:{startAngle:r.startAngle,endAngle:r.endAngle,margin:0,rho:r.rho,startRho:B+(q*b/100),endRho:B+q},hidden:!r.value&&(r.startAngle%s.accuracy)==(r.endAngle%s.accuracy)};for(E=0,C=[];E<aa;E++){Y=P[E];H=Q[E].getAt(U);if(!H){H=X.surface.add(Ext.apply({},{type:"path",group:Q[E],strokeLinejoin:"round"},o,Y))}Y=s.renderer(H,a.getAt(U),Ext.apply({},o,Y),U,a);if(S){s.onAnimate(H,{to:Y})}else{H.setAttributes(Y,true)}C.push(H)}r.shadowAttrs[T]=C}}}for(U=0,F=n.length;U<F;U++){r=n[U];for(T=0,B=0;T<K;T++){z=x.getAt(U*K+T);q=A[T]?a.getAt(U).get(A[T])/Z[U]*r.rho:r.rho;o=Ext.apply({segment:{startAngle:r.startAngle,endAngle:r.endAngle,margin:0,rho:r.rho,startRho:B+(q*b/100),endRho:B+q},hidden:(!r.value&&(r.startAngle%s.accuracy)==(r.endAngle%s.accuracy))},Ext.apply(h,e&&{fill:e[(K>1?T:U)%w]}||{}));D=Ext.apply({},o.segment,{slice:r,series:s,storeItem:r.storeItem,index:U});s.calcMiddle(D);if(g){D.shadows=r.shadowAttrs[T]}y[U]=D;if(!z){m=Ext.apply({type:"path",group:x,middle:D.middle},Ext.apply(h,e&&{fill:e[(K>1?T:U)%w]}||{}));z=J.add(Ext.apply(m,o))}r.sprite=r.sprite||[];D.sprite=z;r.sprite.push(z);r.point=[D.middle.x,D.middle.y];if(S){o=s.renderer(z,a.getAt(U),o,U,a);z._to=o;z._animating=true;s.onAnimate(z,{to:o,listeners:{afteranimate:{fn:function(){this._animating=false},scope:z}}})}else{o=s.renderer(z,a.getAt(U),Ext.apply(o,{hidden:false}),U,a);z.setAttributes(o,true)}B+=q}}F=x.getCount();for(U=0;U<F;U++){if(!n[(U/K)>>0]&&x.getAt(U)){x.getAt(U).hide(true)}}if(g){aa=Q.length;for(E=0;E<F;E++){if(!n[(E/K)>>0]){for(T=0;T<aa;T++){if(Q[T].getAt(E)){Q[T].getAt(E).hide(true)}}}}}s.renderLabels();s.renderCallouts()},onCreateLabel:function(g,l,e,h){var j=this,k=j.labelsGroup,a=j.label,d=j.centerX,c=j.centerY,m=l.middle,b=Ext.apply(j.seriesLabelStyle||{},a||{});return j.chart.surface.add(Ext.apply({type:"text","text-anchor":"middle",group:k,x:m.x,y:m.y},b))},onPlaceLabel:function(k,p,z,t,s,e,g){var B=this,q=B.chart,w=q.resizing,A=B.label,u=A.renderer,c=A.field,m=B.centerX,l=B.centerY,C=z.middle,b={x:C.x,y:C.y},o=C.x-m,n=C.y-l,r={},d=1,j=Math.atan2(n,o||1),v=j*180/Math.PI,h;b.hidden=false;if(this.__excludes&&this.__excludes[t]){b.hidden=true}function a(i){if(i<0){i+=360}return i%360}k.setAttributes({text:u(p.get(c),k,p,z,t,s,e,g)},true);switch(s){case"outside":d=Math.sqrt(o*o+n*n)*2;b.x=d*Math.cos(j)+m;b.y=d*Math.sin(j)+l;break;case"rotate":v=a(v);v=(v>90&&v<270)?v+180:v;h=k.attr.rotation.degrees;if(h!=null&&Math.abs(h-v)>180*0.5){if(v>h){v-=360}else{v+=360}v=v%360}else{v=a(v)}b.rotate={degrees:v,x:b.x,y:b.y};break;default:break}b.translate={x:0,y:0};if(e&&!w&&(s!="rotate"||h!=null)){B.onAnimate(k,{to:b})}else{k.setAttributes(b,true)}k._from=r},onPlaceCallout:function(l,o,z,v,u,d,e){var A=this,q=A.chart,j=A.centerX,h=A.centerY,B=z.middle,b={x:B.x,y:B.y},m=B.x-j,k=B.y-h,c=1,n,g=Math.atan2(k,m||1),a=(l&&l.label?l.label.getBBox():{width:0,height:0}),w=20,t=10,s=10,r;if(!a.width||!a.height){return}c=z.endRho+w;n=(z.endRho+z.startRho)/2+(z.endRho-z.startRho)/3;b.x=c*Math.cos(g)+j;b.y=c*Math.sin(g)+h;m=n*Math.cos(g);k=n*Math.sin(g);if(q.animate){A.onAnimate(l.lines,{to:{path:["M",m+j,k+h,"L",b.x,b.y,"Z","M",b.x,b.y,"l",m>0?t:-t,0,"z"]}});A.onAnimate(l.box,{to:{x:b.x+(m>0?t:-(t+a.width+2*s)),y:b.y+(k>0?(-a.height-s/2):(-a.height-s/2)),width:a.width+2*s,height:a.height+2*s}});A.onAnimate(l.label,{to:{x:b.x+(m>0?(t+s):-(t+a.width+s)),y:b.y+(k>0?-a.height/4:-a.height/4)}})}else{l.lines.setAttributes({path:["M",m+j,k+h,"L",b.x,b.y,"Z","M",b.x,b.y,"l",m>0?t:-t,0,"z"]},true);l.box.setAttributes({x:b.x+(m>0?t:-(t+a.width+2*s)),y:b.y+(k>0?(-a.height-s/2):(-a.height-s/2)),width:a.width+2*s,height:a.height+2*s},true);l.label.setAttributes({x:b.x+(m>0?(t+s):-(t+a.width+s)),y:b.y+(k>0?-a.height/4:-a.height/4)},true)}for(r in l){l[r].show(true)}},onAnimate:function(b,a){b.show();return this.callParent(arguments)},isItemInPoint:function(l,j,n,e){var h=this,d=h.centerX,c=h.centerY,p=Math.abs,o=p(l-d),m=p(j-c),g=n.startAngle,a=n.endAngle,k=Math.sqrt(o*o+m*m),b=Math.atan2(j-c,l-d)/h.rad;if(b>h.firstAngle){b-=h.accuracy}return(b<=g&&b>a&&k>=n.startRho&&k<=n.endRho)},hideAll:function(c){var g,b,j,h,e,a,d;c=(isNaN(this._index)?c:this._index)||0;this.__excludes=this.__excludes||[];this.__excludes[c]=true;d=this.slices[c].sprite;for(e=0,a=d.length;e<a;e++){d[e].setAttributes({hidden:true},true)}if(this.slices[c].shadowAttrs){for(g=0,h=this.slices[c].shadowAttrs,b=h.length;g<b;g++){j=h[g];for(e=0,a=j.length;e<a;e++){j[e].setAttributes({hidden:true},true)}}}this.drawSeries()},showAll:function(a){a=(isNaN(this._index)?a:this._index)||0;this.__excludes[a]=false;this.drawSeries()},highlightItem:function(s){var u=this,t=u.rad,w,d,o,q,a,e,k,b,m,c,g,p,h,v,n,l,j;s=s||this.items[this._index];this.unHighlightItem();if(!s||u.animating||(s.sprite&&s.sprite._animating)){return}u.callParent([s]);if(!u.highlight){return}if("segment" in u.highlightCfg){w=u.highlightCfg.segment;d=u.chart.animate;if(u.labelsGroup){g=u.labelsGroup;p=u.label.display;h=g.getAt(s.index);v=(s.startAngle+s.endAngle)/2*t;n=w.margin||0;l=n*Math.cos(v);j=n*Math.sin(v);if(Math.abs(l)<1e-10){l=0}if(Math.abs(j)<1e-10){j=0}if(d){h.stopAnimation();h.animate({to:{translate:{x:l,y:j}},duration:u.highlightDuration})}else{h.setAttributes({translate:{x:l,y:j}},true)}}if(u.chart.shadow&&s.shadows){q=0;a=s.shadows;k=a.length;for(;q<k;q++){e=a[q];b={};m=s.sprite._from.segment;for(c in m){if(!(c in w)){b[c]=m[c]}}o={segment:Ext.applyIf(b,u.highlightCfg.segment)};if(d){e.stopAnimation();e.animate({to:o,duration:u.highlightDuration})}else{e.setAttributes(o,true)}}}}},unHighlightItem:function(){var w=this,l,e,d,k,t,s,r,q,x,m,c,a,v,n,b,g,u,h,o;if(!w.highlight){return}if(("segment" in w.highlightCfg)&&w.items){l=w.items;e=w.chart.animate;d=!!w.chart.shadow;k=w.labelsGroup;t=l.length;s=0;r=0;q=w.label.display;for(;s<t;s++){u=l[s];if(!u){continue}n=u.sprite;if(n&&n._highlighted){if(k){h=k.getAt(u.index);o=Ext.apply({translate:{x:0,y:0}},q=="rotate"?{rotate:{x:h.attr.x,y:h.attr.y,degrees:h.attr.rotation.degrees}}:{});if(e){h.stopAnimation();h.animate({to:o,duration:w.highlightDuration})}else{h.setAttributes(o,true)}}if(d){b=u.shadows;x=b.length;for(;r<x;r++){c={};a=u.sprite._to.segment;v=u.sprite._from.segment;Ext.apply(c,v);for(m in a){if(!(m in v)){c[m]=a[m]}}g=b[r];if(e){g.stopAnimation();g.animate({to:{segment:c},duration:w.highlightDuration})}else{g.setAttributes({segment:c},true)}}}}}}w.callParent(arguments)},getLegendColor:function(a){var b=this;return(b.colorSet&&b.colorSet[a%b.colorSet.length])||b.colorArrayStyle[a%b.colorArrayStyle.length]}});Ext.define("Ext.chart.series.Radar",{extend:Ext.chart.series.Series,type:"radar",alias:"series.radar",rad:Math.PI/180,showInLegend:false,style:{},constructor:function(c){this.callParent(arguments);var e=this,a=e.chart.surface,d,b;e.group=a.getGroup(e.seriesId);if(e.showMarkers){e.markerGroup=a.getGroup(e.seriesId+"-markers")}},drawSeries:function(){var w=this,c=w.chart.getChartStore(),S=c.data.items,T,I,z=w.group,B,U=w.chart,L=U.series.items,M,v,m,Q=U.animate,o=w.field||w.yField,K=U.surface,F=U.chartBBox,E=w.seriesIdx,j=w.colorArrayStyle,g,e,A,N,r=0,a=[],D=Math.max,k=Math.cos,t=Math.sin,q=Math.PI*2,P=c.getCount(),h,O,J,H,G,R,u,n=w.seriesStyle,b=w.seriesLabelStyle,p=U.resizing||!w.radar,C=U.axes&&U.axes.get(0),V=!(C&&C.maximum);w.setBBox();r=V?0:(C.maximum||0);Ext.apply(n,w.style||{});if(!c||!c.getCount()||w.seriesIsHidden){w.hide();w.items=[];if(w.radar){w.radar.hide(true)}w.radar=null;return}if(!n.stroke){n.stroke=j[w.themeIdx%j.length]}w.unHighlightItem();w.cleanHighlights();g=w.centerX=F.x+(F.width/2);e=w.centerY=F.y+(F.height/2);w.radius=N=Math.min(F.width,F.height)/2;w.items=A=[];if(V){for(M=0,v=L.length;M<v;M++){m=L[M];a.push(m.yField)}for(T=0;T<P;T++){I=S[T];for(R=0,u=a.length;R<u;R++){r=D(+I.get(a[R]),r)}}}r=r||1;h=[];O=[];for(R=0;R<P;R++){I=S[R];G=N*I.get(o)/r;J=G*k(R/P*q);H=G*t(R/P*q);if(R==0){O.push("M",J+g,H+e);h.push("M",0.01*J+g,0.01*H+e)}else{O.push("L",J+g,H+e);h.push("L",0.01*J+g,0.01*H+e)}A.push({sprite:false,point:[g+J,e+H],storeItem:I,series:w})}O.push("Z");if(!w.radar){w.radar=K.add(Ext.apply({type:"path",group:z,path:h},n||{}))}if(U.resizing){w.radar.setAttributes({path:h},true)}if(U.animate){w.onAnimate(w.radar,{to:Ext.apply({path:O},n||{})})}else{w.radar.setAttributes(Ext.apply({path:O},n||{}),true)}if(w.showMarkers){w.drawMarkers()}w.renderLabels();w.renderCallouts()},drawMarkers:function(){var n=this,k=n.chart,a=k.surface,p=k.getChartStore(),b=Ext.apply({},n.markerStyle||{}),j=Ext.apply(b,n.markerConfig,{fill:n.colorArrayStyle[n.themeIdx%n.colorArrayStyle.length]}),m=n.items,o=j.type,s=n.markerGroup,e=n.centerX,d=n.centerY,r,h,c,g,q;delete j.type;for(h=0,c=m.length;h<c;h++){r=m[h];g=s.getAt(h);if(!g){g=Ext.chart.Shape[o](a,Ext.apply({group:s,x:0,y:0,translate:{x:e,y:d}},j))}else{g.show()}r.sprite=g;if(k.resizing){g.setAttributes({x:0,y:0,translate:{x:e,y:d}},true)}g._to={translate:{x:r.point[0],y:r.point[1]}};q=n.renderer(g,p.getAt(h),g._to,h,p);q=Ext.applyIf(q||{},j||{});if(k.animate){n.onAnimate(g,{to:q})}else{g.setAttributes(q,true)}}},isItemInPoint:function(c,g,e){var b,d=10,a=Math.abs;b=e.point;return(a(b[0]-c)<=d&&a(b[1]-g)<=d)},onCreateLabel:function(g,m,e,h){var j=this,l=j.labelsGroup,a=j.label,d=j.centerX,c=j.centerY,k=m.point,b=Ext.apply(j.seriesLabelStyle||{},a);return j.chart.surface.add(Ext.apply({type:"text","text-anchor":"middle",group:l,x:d,y:c},a||{}))},onPlaceLabel:function(e,l,r,o,n,c,d){var t=this,m=t.chart,q=m.resizing,s=t.label,p=s.renderer,b=s.field,h=t.centerX,g=t.centerY,a={x:r.point[0],y:r.point[1]},k=a.x-h,j=a.y-g;e.setAttributes({text:p(l.get(b),e,l,r,o,n,c,d),hidden:true},true);if(q){e.setAttributes({x:h,y:g},true)}if(c){e.show(true);t.onAnimate(e,{to:a})}else{e.setAttributes(a,true);e.show(true)}},toggleAll:function(a){var e=this,b,d,g,c;if(!a){Ext.chart.series.Radar.superclass.hideAll.call(e)}else{Ext.chart.series.Radar.superclass.showAll.call(e)}if(e.radar){e.radar.setAttributes({hidden:!a},true);if(e.radar.shadows){for(b=0,c=e.radar.shadows,d=c.length;b<d;b++){g=c[b];g.setAttributes({hidden:!a},true)}}}},hideAll:function(){this.toggleAll(false);this.hideMarkers(0)},showAll:function(){this.toggleAll(true)},hideMarkers:function(a){var d=this,c=d.markerGroup&&d.markerGroup.getCount()||0,b=a||0;for(;b<c;b++){d.markerGroup.getAt(b).hide(true)}},getAxesForXAndYFields:function(){var c=this,b=c.chart,d=b.axes,a=[].concat(d&&d.get(0));return{yAxis:a}}});Ext.define("Ext.chart.series.Scatter",{extend:Ext.chart.series.Cartesian,type:"scatter",alias:"series.scatter",constructor:function(c){this.callParent(arguments);var e=this,g=e.chart.shadow,a=e.chart.surface,d,b;Ext.apply(e,c,{style:{},markerConfig:{},shadowAttributes:[{"stroke-width":6,"stroke-opacity":0.05,stroke:"rgb(0, 0, 0)"},{"stroke-width":4,"stroke-opacity":0.1,stroke:"rgb(0, 0, 0)"},{"stroke-width":2,"stroke-opacity":0.15,stroke:"rgb(0, 0, 0)"}]});e.group=a.getGroup(e.seriesId);if(g){for(d=0,b=e.shadowAttributes.length;d<b;d++){e.shadowGroups.push(a.getGroup(e.seriesId+"-shadows"+d))}}},getBounds:function(){var s=this,j=s.chart,d=j.getChartStore(),o=j.axes,l=s.getAxesForXAndYFields(),k=l.xAxis,e=l.yAxis,a,t,c,g,r,p,q,n,m,b,h;s.setBBox();a=s.bbox;if(b=o.get(k)){h=b.applyData();r=h.from;q=h.to}if(b=o.get(e)){h=b.applyData();p=h.from;n=h.to}if(s.xField&&!Ext.isNumber(r)){b=s.getMinMaxXValues();r=b[0];q=b[1]}if(s.yField&&!Ext.isNumber(p)){b=s.getMinMaxYValues();p=b[0];n=b[1]}if(isNaN(r)){r=0;q=d.getCount()-1;t=a.width/(d.getCount()-1)}else{t=a.width/(q-r)}if(isNaN(p)){p=0;n=d.getCount()-1;c=a.height/(d.getCount()-1)}else{c=a.height/(n-p)}return{bbox:a,minX:r,minY:p,xScale:t,yScale:c}},getPaths:function(){var z=this,n=z.chart,b=n.shadow,e=n.getChartStore(),B=e.data.items,s,l,d,j=z.group,g=z.bounds=z.getBounds(),a=z.bbox,C=g.xScale,c=g.yScale,v=g.minX,u=g.minY,A=a.x,w=a.y,h=a.height,o=z.items=[],q=[],m,k,r,t,p;for(s=0,l=B.length;s<l;s++){d=B[s];r=d.get(z.xField);t=d.get(z.yField);if(typeof t=="undefined"||(typeof t=="string"&&!t)||r==null||t==null){continue}if(typeof r=="string"||typeof r=="object"&&!Ext.isDate(r)){r=s}if(typeof t=="string"||typeof t=="object"&&!Ext.isDate(t)){t=s}m=A+(r-v)*C;k=w+h-(t-u)*c;q.push({x:m,y:k});z.items.push({series:z,value:[r,t],point:[m,k],storeItem:d});if(n.animate&&n.resizing){p=j.getAt(s);if(p){z.resetPoint(p);if(b){z.resetShadow(p)}}}}return q},resetPoint:function(a){var b=this.bbox;a.setAttributes({translate:{x:(b.x+b.width)/2,y:(b.y+b.height)/2}},true)},resetShadow:function(c){var g=this,e=c.shadows,j=g.shadowAttributes,d=g.shadowGroups.length,h=g.bbox,b,a;for(b=0;b<d;b++){a=Ext.apply({},j[b]);if(a.translate){a.translate.x+=(h.x+h.width)/2;a.translate.y+=(h.y+h.height)/2}else{a.translate={x:(h.x+h.width)/2,y:(h.y+h.height)/2}}e[b].setAttributes(a,true)}},createPoint:function(a,c){var d=this,b=d.chart,e=d.group,g=d.bbox;return Ext.chart.Shape[c](b.surface,Ext.apply({},{x:0,y:0,group:e,translate:{x:(g.x+g.width)/2,y:(g.y+g.height)/2}},a))},createShadow:function(n,g,k){var j=this,h=j.chart,l=j.shadowGroups,d=j.shadowAttributes,a=l.length,o=j.bbox,c,m,b,e;n.shadows=b=[];for(c=0;c<a;c++){e=Ext.apply({},d[c]);if(e.translate){e.translate.x+=(o.x+o.width)/2;e.translate.y+=(o.y+o.height)/2}else{Ext.apply(e,{translate:{x:(o.x+o.width)/2,y:(o.y+o.height)/2}})}Ext.apply(e,g);m=Ext.chart.Shape[k](h.surface,Ext.apply({},{x:0,y:0,group:l[c]},e));b.push(m)}},drawSeries:function(){var u=this,l=u.chart,h=l.getChartStore(),j=u.group,c=l.shadow,a=u.shadowGroups,q=u.shadowAttributes,r=a.length,m,n,o,k,p,t,e,g,b,d,s;t=Ext.apply(u.markerStyle,u.markerConfig);g=t.type;delete t.type;if(!h||!h.getCount()){u.hide();u.items=[];return}u.unHighlightItem();u.cleanHighlights();n=u.getPaths();k=n.length;for(p=0;p<k;p++){o=n[p];m=j.getAt(p);Ext.apply(o,t);if(!m){m=u.createPoint(o,g);if(c){u.createShadow(m,t,g)}}b=m.shadows;if(l.animate){d=u.renderer(m,h.getAt(p),{translate:o},p,h);m._to=d;u.onAnimate(m,{to:d});for(e=0;e<r;e++){s=Ext.apply({},q[e]);d=u.renderer(b[e],h.getAt(p),Ext.apply({},{hidden:false,translate:{x:o.x+(s.translate?s.translate.x:0),y:o.y+(s.translate?s.translate.y:0)}},s),p,h);u.onAnimate(b[e],{to:d})}}else{d=u.renderer(m,h.getAt(p),{translate:o},p,h);m._to=d;m.setAttributes(d,true);for(e=0;e<r;e++){s=Ext.apply({},q[e]);d=u.renderer(b[e],h.getAt(p),Ext.apply({},{hidden:false,translate:{x:o.x+(s.translate?s.translate.x:0),y:o.y+(s.translate?s.translate.y:0)}},s),p,h);b[e].setAttributes(d,true)}}u.items[p].sprite=m}k=j.getCount();for(p=n.length;p<k;p++){j.getAt(p).hide(true)}u.renderLabels();u.renderCallouts()},onCreateLabel:function(d,k,c,e){var g=this,h=g.labelsGroup,a=g.label,b=Ext.apply({},a,g.seriesLabelStyle),j=g.bbox;return g.chart.surface.add(Ext.apply({type:"text",group:h,x:k.point[0],y:j.y+j.height/2},b))},onPlaceLabel:function(h,l,u,r,q,d,g){var w=this,m=w.chart,t=m.resizing,v=w.label,s=v.renderer,b=v.field,a=w.bbox,k=u.point[0],j=u.point[1],c=u.sprite.attr.radius,e,o,n,p;h.setAttributes({text:s(l.get(b),h,l,u,r,q,d,g),hidden:true},true);if(q=="rotate"){h.setAttributes({"text-anchor":"start",rotation:{x:k,y:j,degrees:-45}},true);e=h.getBBox();o=e.width;n=e.height;k=k<a.x?a.x:k;k=(k+o>a.x+a.width)?(k-(k+o-a.x-a.width)):k;j=(j-n<a.y)?a.y+n:j}else{if(q=="under"||q=="over"){e=u.sprite.getBBox();e.width=e.width||(c*2);e.height=e.height||(c*2);j=j+(q=="over"?-e.height:e.height);e=h.getBBox();o=e.width/2;n=e.height/2;k=k-o<a.x?a.x+o:k;k=(k+o>a.x+a.width)?(k-(k+o-a.x-a.width)):k;j=j-n<a.y?a.y+n:j;j=(j+n>a.y+a.height)?(j-(j+n-a.y-a.height)):j}}if(!m.animate){h.setAttributes({x:k,y:j},true);h.show(true)}else{if(t){p=u.sprite.getActiveAnimation();if(p){p.on("afteranimate",function(){h.setAttributes({x:k,y:j},true);h.show(true)})}else{h.show(true)}}else{w.onAnimate(h,{to:{x:k,y:j}})}}},onPlaceCallout:function(k,m,B,z,w,c,h){var E=this,n=E.chart,u=n.surface,A=n.resizing,D=E.callouts,o=E.items,b=B.point,F,a=k.label.getBBox(),C=30,t=10,s=3,e,d,g,r,q,v=E.bbox,l,j;F=[Math.cos(Math.PI/4),-Math.sin(Math.PI/4)];l=b[0]+F[0]*C;j=b[1]+F[1]*C;e=l+(F[0]>0?0:-(a.width+2*s));d=j-a.height/2-s;g=a.width+2*s;r=a.height+2*s;if(e<v[0]||(e+g)>(v[0]+v[2])){F[0]*=-1}if(d<v[1]||(d+r)>(v[1]+v[3])){F[1]*=-1}l=b[0]+F[0]*C;j=b[1]+F[1]*C;e=l+(F[0]>0?0:-(a.width+2*s));d=j-a.height/2-s;g=a.width+2*s;r=a.height+2*s;if(n.animate){E.onAnimate(k.lines,{to:{path:["M",b[0],b[1],"L",l,j,"Z"]}},true);E.onAnimate(k.box,{to:{x:e,y:d,width:g,height:r}},true);E.onAnimate(k.label,{to:{x:l+(F[0]>0?s:-(a.width+s)),y:j}},true)}else{k.lines.setAttributes({path:["M",b[0],b[1],"L",l,j,"Z"]},true);k.box.setAttributes({x:e,y:d,width:g,height:r},true);k.label.setAttributes({x:l+(F[0]>0?s:-(a.width+s)),y:j},true)}for(q in k){k[q].show(true)}},onAnimate:function(b,a){b.show();return this.callParent(arguments)},isItemInPoint:function(c,h,e){var b,d=10,a=Math.abs;function g(i){var k=a(i[0]-c),j=a(i[1]-h);return Math.sqrt(k*k+j*j)}b=e.point;return(b[0]-d<=c&&b[0]+d>=c&&b[1]-d<=h&&b[1]+d>=h)}});Ext.define("Ext.layout.container.Table",{alias:["layout.table"],extend:Ext.layout.container.Container,alternateClassName:"Ext.layout.TableLayout",monitorResize:false,type:"table",createsInnerCt:true,targetCls:Ext.baseCSSPrefix+"table-layout-ct",tableCls:Ext.baseCSSPrefix+"table-layout",cellCls:Ext.baseCSSPrefix+"table-layout-cell",tableAttrs:null,getItemSizePolicy:function(a){return this.autoSizePolicy},initHierarchyState:function(a){a.inShrinkWrapTable=true},getLayoutItems:function(){var g=this,b=[],c=g.callParent(),e,a=c.length,d;for(d=0;d<a;d++){e=c[d];if(!e.hidden){b.push(e)}}return b},getHiddenItems:function(){var b=[],c=this.owner.items.items,a=c.length,d=0,e;for(;d<a;++d){e=c[d];if(e.rendered&&e.hidden){b.push(e)}}return b},renderChildren:function(){var l=this,k=l.getLayoutItems(),h=l.owner.getTargetEl().child("table",true).tBodies[0],r=h.rows,g=0,j=k.length,e=l.getHiddenItems(),q,o,c,a,p,n,m,b,d;q=l.calculateCells(k);for(;g<j;g++){o=q[g];c=o.rowIdx;a=o.cellIdx;p=k[g];n=r[c];if(!n){n=h.insertRow(c);if(l.trAttrs){n.set(l.trAttrs)}}b=m=Ext.get(n.cells[a]||n.insertCell(a));if(l.needsDivWrap()){b=m.first()||m.createChild({tag:"div"});b.setWidth(null)}if(!p.rendered){l.renderItem(p,b,0)}else{if(!l.isValidParent(p,b,c,a,h)){l.moveItem(p,b,0)}}if(l.tdAttrs){m.set(l.tdAttrs)}if(p.tdAttrs){m.set(p.tdAttrs)}m.set({colSpan:p.colspan||1,rowSpan:p.rowspan||1,id:p.cellId||"",cls:l.cellCls+" "+(p.cellCls||"")});if(!q[g+1]||q[g+1].rowIdx!==c){a++;while(n.cells[a]){n.deleteCell(a)}}}c++;while(h.rows[c]){h.deleteRow(c)}for(g=0,j=e.length;g<j;++g){l.ensureInDocument(e[g].getEl())}},ensureInDocument:function(a){var b=a.dom.parentNode;while(b){if(b.tagName.toUpperCase()=="BODY"){return}b=b.parentNode}Ext.getDetachedBody().appendChild(a)},calculate:function(g){if(!g.hasDomProp("containerChildrenSizeDone")){this.done=false}else{var c=g.targetContext,b=g.widthModel.shrinkWrap,a=g.heightModel.shrinkWrap,h=a||b,d=h&&c.el.child("table",true),e=h&&c.getPaddingInfo();if(b){g.setContentWidth(d.offsetWidth+e.width,true)}if(a){g.setContentHeight(d.offsetHeight+e.height,true)}}},finalizeLayout:function(){if(this.needsDivWrap()){var b=this.getLayoutItems(),c,a=b.length,d;for(c=0;c<a;c++){d=b[c];Ext.fly(d.el.dom.parentNode).setWidth(d.getWidth())}}if(Ext.isIE6||Ext.isIEQuirks){this.owner.getTargetEl().child("table").repaint()}},calculateCells:function(k){var m=[],b=0,d=0,a=0,h=this.columns||Infinity,n=[],e=0,c,g=k.length,l;for(;e<g;e++){l=k[e];while(d>=h||n[d]>0){if(d>=h){d=0;a=0;b++;for(c=0;c<h;c++){if(n[c]>0){n[c]--}}}else{d++}}m.push({rowIdx:b,cellIdx:a});for(c=l.colspan||1;c;--c){n[d]=l.rowspan||1;++d}++a}return m},getRenderTree:function(){var k=this,h=k.getLayoutItems(),o,p=[],q=Ext.apply({tag:"table",role:"presentation",cls:k.tableCls,cellspacing:0,cellpadding:0,cn:{tag:"tbody",cn:p}},k.tableAttrs),c=k.tdAttrs,d=k.needsDivWrap(),e,g=h.length,n,m,j,b,a,l;o=k.calculateCells(h);for(e=0;e<g;e++){n=h[e];m=o[e];b=m.rowIdx;a=m.cellIdx;j=p[b];if(!j){j=p[b]={tag:"tr",cn:[]};if(k.trAttrs){Ext.apply(j,k.trAttrs)}}l=j.cn[a]={tag:"td"};if(c){Ext.apply(l,c)}Ext.apply(l,{colSpan:n.colspan||1,rowSpan:n.rowspan||1,id:n.cellId||"",cls:k.cellCls+" "+(n.cellCls||"")});if(d){l=l.cn={tag:"div"}}k.configureItem(n);l.cn=n.getRenderTree()}return q},isValidParent:function(g,h,e,d){var b,a,c;if(arguments.length===3){c=g.el.up("table");return c&&c.dom.parentNode===h.dom}b=this.owner.getTargetEl().child("table",true).tBodies[0];a=b.rows[e].cells[d];return g.el.dom.parentNode===a},needsDivWrap:function(){return Ext.isOpera10_5}});Ext.define("Ext.container.ButtonGroup",{extend:Ext.panel.Panel,alias:"widget.buttongroup",alternateClassName:"Ext.ButtonGroup",baseCls:Ext.baseCSSPrefix+"btn-group",layout:{type:"table"},defaultType:"button",frame:true,frameHeader:false,titleAlign:"center",noTitleCls:"notitle",initComponent:function(){var a=this,b=a.columns;if(b){a.layout=Ext.apply({},{columns:b},a.layout)}if(!a.title){a.addClsWithUI(a.noTitleCls)}a.callParent(arguments)},onBeforeAdd:function(a){if(a.isButton){if(this.defaultButtonUI&&a.ui==="default"&&!a.hasOwnProperty("ui")){a.ui=this.defaultButtonUI}else{a.ui=a.ui+"-toolbar"}}this.callParent(arguments)},applyDefaults:function(a){if(!Ext.isString(a)){a=this.callParent(arguments)}return a}});Ext.define("Ext.container.Monitor",{target:null,selector:"",scope:null,addHandler:null,removeHandler:null,disabled:0,constructor:function(a){Ext.apply(this,a)},bind:function(b){var a=this;a.target=b;b.on("beforedestroy",a.disable,a);a.onContainerAdd(b)},unbind:function(){var a=this,b=a.target;if(b){b.un("beforedestroy",a.disable,a)}a.items=null},disable:function(){++this.disabled},enable:function(){if(this.disabled>0){--this.disabled}},handleAdd:function(b,a){if(!this.disabled){if(a.is(this.selector)){this.onItemAdd(a.ownerCt,a)}if(a.isContainer){this.onContainerAdd(a)}}},onItemAdd:function(c,b){var e=this,a=e.items,d=e.addHandler;if(!e.disabled){if(d){d.call(e.scope||b,b)}if(a){a.add(b)}}},onItemRemove:function(c,b){var e=this,a=e.items,d=e.removeHandler;if(!e.disabled){if(d){d.call(e.scope||b,b)}if(a){a.remove(b)}}},onContainerAdd:function(g,b){var k=this,j,h,c=k.handleAdd,a=k.handleRemove,d,e;g.on("add",c,k);g.on("dockedadd",c,k);g.on("remove",a,k);g.on("dockedremove",a,k);if(b!==true){j=g.query(k.selector);for(d=0,h=j.length;d<h;++d){e=j[d];k.onItemAdd(e.ownerCt,e)}}j=g.query("container");for(d=0,h=j.length;d<h;++d){k.onContainerAdd(j[d],true)}},handleRemove:function(b,a){var c=this;if(!c.disabled){if(a.is(c.selector)){c.onItemRemove(b,a)}if(a.isContainer){c.onContainerRemove(b,a)}}},onContainerRemove:function(e,c){var h=this,j=e.destroying,b,d,a,g;if(!j){h.removeCtListeners(c)}b=c.query(h.selector);for(d=0,a=b.length;d<a;++d){g=b[d];h.onItemRemove(g.ownerCt,g)}if(!j){b=c.query("container");for(d=0,a=b.length;d<a;++d){h.removeCtListeners(b[d])}}},removeCtListeners:function(a){var b=this;a.un("add",b.handleAdd,b);a.un("dockedadd",b.handleAdd,b);a.un("remove",b.handleRemove,b);a.un("dockedremove",b.handleRemove,b)},getItems:function(){var b=this,a=b.items;if(!a){a=b.items=new Ext.util.MixedCollection();a.addAll(b.target.query(b.selector))}return a},invalidateItems:function(){this.items=null}});Ext.define("Ext.container.Viewport",{extend:Ext.container.Container,alias:"widget.viewport",alternateClassName:"Ext.Viewport",isViewport:true,ariaRole:"application",preserveElOnDestroy:true,initComponent:function(){var c=this,a=document.body.parentNode,b=c.el=Ext.getBody();Ext.getScrollbarSize();c.width=c.height=undefined;c.callParent(arguments);Ext.fly(a).addCls(Ext.baseCSSPrefix+"viewport");if(c.autoScroll){Ext.fly(a).setStyle(c.getOverflowStyle());delete c.autoScroll}b.setHeight=b.setWidth=Ext.emptyFn;b.dom.scroll="no";c.allowDomMove=false;c.renderTo=c.el},applyTargetCls:function(a){this.el.addCls(a)},onRender:function(){var a=this;a.callParent(arguments);a.width=Ext.Element.getViewportWidth();a.height=Ext.Element.getViewportHeight()},afterFirstLayout:function(){var a=this;a.callParent(arguments);setTimeout(function(){Ext.EventManager.onWindowResize(a.fireResize,a)},1)},fireResize:function(b,a){if(b!=this.width||a!=this.height){this.setSize(b,a)}},initHierarchyState:function(a){this.callParent([this.hierarchyState=Ext.rootHierarchyState])}});Ext.define("Ext.data.IdGenerator",{isGenerator:true,constructor:function(a){var b=this;Ext.apply(b,a);if(b.id){Ext.data.IdGenerator.all[b.id]=b}},getRecId:function(a){return a.modelName+"-"+a.internalId},statics:{all:{},get:function(a){var c,d,b;if(typeof a=="string"){d=b=a;a=null}else{if(a.isGenerator){return a}else{d=a.id||a.type;b=a.type}}c=this.all[d];if(!c){c=Ext.create("idgen."+b,a)}return c}}});Ext.define("Ext.data.SortTypes",{singleton:true,none:Ext.identityFn,stripTagsRE:/<\/?[^>]+>/gi,asText:function(a){return String(a).replace(this.stripTagsRE,"")},asUCText:function(a){return String(a).toUpperCase().replace(this.stripTagsRE,"")},asUCString:function(a){return String(a).toUpperCase()},asDate:function(a){if(!a){return 0}if(Ext.isDate(a)){return a.getTime()}return Date.parse(String(a))},asFloat:function(a){var b=parseFloat(String(a).replace(/,/g,""));return isNaN(b)?0:b},asInt:function(a){var b=parseInt(String(a).replace(/,/g,""),10);return isNaN(b)?0:b}});Ext.define("Ext.data.Types",{singleton:true},function(){var a=Ext.data.SortTypes;Ext.apply(Ext.data.Types,{stripRe:/[\$,%]/g,AUTO:{sortType:a.none,type:"auto"},STRING:{convert:function(c){var b=this.useNull?null:"";return(c===undefined||c===null)?b:String(c)},sortType:a.asUCString,type:"string"},INT:{convert:function(b){if(typeof b=="number"){return parseInt(b)}return b!==undefined&&b!==null&&b!==""?parseInt(String(b).replace(Ext.data.Types.stripRe,""),10):(this.useNull?null:0)},sortType:a.none,type:"int"},FLOAT:{convert:function(b){if(typeof b==="number"){return b}return b!==undefined&&b!==null&&b!==""?parseFloat(String(b).replace(Ext.data.Types.stripRe,""),10):(this.useNull?null:0)},sortType:a.none,type:"float"},BOOL:{convert:function(b){if(typeof b==="boolean"){return b}if(this.useNull&&(b===undefined||b===null||b==="")){return null}return b===true||b==="true"||b==1},sortType:a.none,type:"bool"},DATE:{convert:function(c){var d=this.dateReadFormat||this.dateFormat,b;if(!c){return null}if(c instanceof Date){return c}if(d){return Ext.Date.parse(c,d)}b=Date.parse(c);return b?new Date(b):null},sortType:a.asDate,type:"date"}});Ext.apply(Ext.data.Types,{BOOLEAN:this.BOOL,INTEGER:this.INT,NUMBER:this.FLOAT})});Ext.define("Ext.data.Field",{alias:"data.field",isField:true,constructor:function(b){var d=this,c=Ext.data.Types,a;if(Ext.isString(b)){b={name:b}}Ext.apply(d,b);a=d.sortType;if(d.type){if(Ext.isString(d.type)){d.type=c[d.type.toUpperCase()]||c.AUTO}}else{d.type=c.AUTO}if(Ext.isString(a)){d.sortType=Ext.data.SortTypes[a]}else{if(Ext.isEmpty(a)){d.sortType=d.type.sortType}}if(!b.hasOwnProperty("convert")){d.convert=d.type.convert}else{if(!d.convert&&d.type.convert&&!b.hasOwnProperty("defaultValue")){d.defaultValue=d.type.convert(d.defaultValue)}}if(b.convert){d.hasCustomConvert=true}},dateFormat:null,dateReadFormat:null,dateWriteFormat:null,useNull:false,defaultValue:"",mapping:null,sortType:null,sortDir:"ASC",allowBlank:true,persist:true});Ext.define("Ext.data.Errors",{extend:Ext.util.MixedCollection,isValid:function(){return this.length===0},getByField:function(d){var c=[],a,b;for(b=0;b<this.length;b++){a=this.items[b];if(a.field==d){c.push(a)}}return c}});Ext.define("Ext.data.validations",{singleton:true,presenceMessage:"must be present",lengthMessage:"is the wrong length",formatMessage:"is the wrong format",inclusionMessage:"is not included in the list of acceptable values",exclusionMessage:"is not an acceptable value",emailMessage:"is not a valid email address",emailRe:/^([a-zA-Z0-9_\.\-])+\@(([a-zA-Z0-9\-])+\.)+([a-zA-Z0-9]{2,4})+$/,presence:function(a,b){if(arguments.length===1){b=a}return !!b||b===0||b===false},length:function(b,e){if(e===undefined||e===null){return false}var d=e.length,c=b.min,a=b.max;if((c&&d<c)||(a&&d>a)){return false}else{return true}},email:function(b,a){return Ext.data.validations.emailRe.test(a)},format:function(a,b){return !!(a.matcher&&a.matcher.test(b))},inclusion:function(a,b){return a.list&&Ext.Array.indexOf(a.list,b)!=-1},exclusion:function(a,b){return a.list&&Ext.Array.indexOf(a.list,b)==-1}});Ext.define("Ext.data.Model",{alternateClassName:"Ext.data.Record",mixins:{observable:Ext.util.Observable},compareConvertFields:function(a,d){var c=a.convert&&a.type&&a.convert!==a.type.convert,b=d.convert&&d.type&&d.convert!==d.type.convert;if(c&&!b){return 1}if(!c&&b){return -1}return 0},itemNameFn:function(a){return a.name},onClassExtended:function(b,c,a){var d=a.onBeforeCreated;a.onBeforeCreated=function(g,F){var E=this,G=Ext.getClassName(g),t=g.prototype,z=g.prototype.superclass,j=F.validations||[],v=F.fields||[],h,o=F.associations||[],e=function(I,K){var J=0,H,L;if(I){I=Ext.Array.from(I);for(H=I.length;J<H;++J){L=I[J];if(!Ext.isObject(L)){L={model:L}}L.type=K;o.push(L)}}},w=F.idgen,C=new Ext.util.MixedCollection(false,t.itemNameFn),A=new Ext.util.MixedCollection(false,t.itemNameFn),s=z.validations,D=z.fields,m=z.associations,B,y,q,r=[],p="idProperty" in F?F.idProperty:t.idProperty,n=p?(p.isField?p:new Ext.data.Field(p)):null,k=false,x=function(I,H,i){var J,K;if(C.events.add.firing){K=I;J=H}else{J=i;K=H.originalIndex}J.originalIndex=K;if(n&&((J.mapping&&(J.mapping===n.mapping))||(J.name===n.name))){t.idField=J;k=true;J.defaultValue=undefined}},u=F.proxy,l=function(){C.sortBy(t.compareConvertFields)};g.modelName=G;t.modelName=G;if(s){j=s.concat(j)}F.validations=j;if(D){v=D.items.concat(v)}C.on({add:x,replace:x});for(y=0,q=v.length;y<q;++y){h=v[y];C.add(h.isField?h:new Ext.data.Field(h))}if(n&&!k){t.idField=n;n.defaultValue=undefined;C.add(n)}l();C.on({add:l,replace:l});F.fields=C;if(w){F.idgen=Ext.data.IdGenerator.get(w)}e(F.belongsTo,"belongsTo");delete F.belongsTo;e(F.hasMany,"hasMany");delete F.hasMany;e(F.hasOne,"hasOne");delete F.hasOne;if(m){o=m.items.concat(o)}for(y=0,q=o.length;y<q;++y){r.push("association."+o[y].type.toLowerCase())}if(u){if(!u.isProxy){r.push("proxy."+(u.type||u))}}else{if(!g.prototype.proxy){g.prototype.proxy=g.prototype.defaultProxyType;r.push("proxy."+g.prototype.defaultProxyType)}}Ext.require(r,function(){Ext.ModelManager.registerType(G,g);for(y=0,q=o.length;y<q;++y){B=o[y];if(B.isAssociation){B=Ext.applyIf({ownerModel:G,associatedModel:B.model},B.initialConfig)}else{Ext.apply(B,{ownerModel:G,associatedModel:B.model})}if(Ext.ModelManager.getModel(B.model)===undefined){Ext.ModelManager.registerDeferredAssociation(B)}else{A.add(Ext.data.association.Association.create(B))}}F.associations=A;d.call(E,g,F,a);if(u&&u.isProxy){g.setProxy(u)}Ext.ModelManager.onModelDefined(g)})}},inheritableStatics:{setProxy:function(a){if(!a.isProxy){if(typeof a=="string"){a={type:a}}a=Ext.createByAlias("proxy."+a.type,a)}a.setModel(this);this.proxy=this.prototype.proxy=a;return a},getProxy:function(){var a=this.proxy;if(!a){a=this.prototype.proxy;if(a.isProxy){a=a.clone()}return this.setProxy(a)}return a},setFields:function(g,n,m){var k=this,a,b,l=false,e=k.prototype,c=e.fields,j=e.superclass.fields,h,d;if(n){e.idProperty=n;b=n.isField?n:new Ext.data.Field(n)}if(m){e.clientIdProperty=m}if(c){c.clear()}else{c=k.prototype.fields=new Ext.util.MixedCollection(false,function(i){return i.name})}if(j){g=j.items.concat(g)}for(d=0,h=g.length;d<h;d++){a=new Ext.data.Field(g[d]);if(b&&((a.mapping&&(a.mapping===b.mapping))||(a.name===b.name))){l=true;a.defaultValue=undefined}c.add(a)}if(b&&!l){b.defaultValue=undefined;c.add(b)}k.fields=c;return c},getFields:function(){return this.prototype.fields.items},load:function(g,c){c=Ext.apply({},c);c=Ext.applyIf(c,{action:"read",id:g});var b=new Ext.data.Operation(c),d=c.scope||this,a=null,e;e=function(h){if(h.wasSuccessful()){a=h.getRecords()[0];if(!a.hasId()){a.setId(g)}Ext.callback(c.success,d,[a,h])}else{Ext.callback(c.failure,d,[a,h])}Ext.callback(c.callback,d,[a,h])};this.getProxy().read(b,e,this)}},statics:{PREFIX:"ext-record",AUTO_ID:1,EDIT:"edit",REJECT:"reject",COMMIT:"commit",id:function(a){var b=[this.PREFIX,"-",this.AUTO_ID++].join("");a.phantom=true;a.internalId=b;return b}},idgen:{isGenerator:true,type:"default",generate:function(){return null},getRecId:function(a){return a.modelName+"-"+a.internalId}},editing:false,dirty:false,persistenceProperty:"data",evented:false,isModel:true,phantom:false,idProperty:"id",clientIdProperty:null,defaultProxyType:"ajax",emptyData:[],constructor:function(l,e,q,b){var n=this,k=(e||e===0),r,m,g,o,a,p,h,d,s=n.idProperty,c=n.idField,j;n.raw=q||l;n.modified={};d=n[n.persistenceProperty]=b||{};n.data=n[n.persistenceProperty];n.mixins.observable.constructor.call(n);if(!b){if(l){if(!k&&s){e=l[s];r=(e||e===0)}}else{l=n.emptyData}m=n.fields.items;g=m.length;j=0;if(Ext.isArray(l)){for(;j<g;j++){o=m[j];a=o.name;p=l[o.originalIndex];if(p===undefined){p=o.defaultValue}if(o.convert){p=o.convert(p,n)}if(p!==undefined){d[a]=p}}}else{for(;j<g;j++){o=m[j];a=o.name;p=l[a];if(p===undefined){p=o.defaultValue}if(o.convert){p=o.convert(p,n)}if(p!==undefined){d[a]=p}}}}n.stores=[];if(k){r=true;d[s]=c&&c.convert?c.convert(e):e}else{if(!r){h=n.idgen.generate();if(h!=null){n.preventInternalUpdate=true;n.setId(h);delete n.preventInternalUpdate}}}n.internalId=r?e:Ext.data.Model.id(n);if(typeof n.init=="function"){n.init()}n.id=n.idgen.getRecId(n)},get:function(a){return this[this.persistenceProperty][a]},_singleProp:{},set:function(r,b){var j=this,h=j[j.persistenceProperty],i=j.fields,q=j.modified,o=(typeof r=="string"),p,k,g,n,e,a,c,d,l,m;if(o){m=j._singleProp;m[r]=b}else{m=r}for(a in m){if(m.hasOwnProperty(a)){l=m[a];if(i&&(k=i.get(a))&&k.convert){l=k.convert(l,j)}p=h[a];if(j.isEqual(p,l)){continue}h[a]=l;(e||(e=[])).push(a);if(k&&k.persist){if(q.hasOwnProperty(a)){if(j.isEqual(q[a],l)){delete q[a];j.dirty=false;for(n in q){if(q.hasOwnProperty(n)){j.dirty=true;break}}}}else{j.dirty=true;q[a]=p}}if(a==j.idProperty){g=true;c=p;d=l}}}if(o){delete m[r]}if(g){j.changeId(c,d)}if(!j.editing&&e){j.afterEdit(e)}return e||null},copyFrom:function(j){var h=this,e=h.fields.items,m=e.length,b=[],k,c=0,g,d,n=h.idProperty,a,l;if(j){g=h[h.persistenceProperty];d=j[j.persistenceProperty];for(;c<m;c++){k=e[c];a=k.name;if(a!=n){l=d[a];if(l!==undefined&&!h.isEqual(g[a],l)){g[a]=l;b.push(a)}}}if(h.phantom&&!j.phantom){h.beginEdit();h.setId(j.getId());h.endEdit(true);h.commit(true)}}return b},isEqual:function(d,c){if(d instanceof Date&&c instanceof Date){return d.getTime()===c.getTime()}return d===c},beginEdit:function(){var b=this,a,c,d;if(!b.editing){b.editing=true;b.dirtySave=b.dirty;d=b[b.persistenceProperty];c=b.dataSave={};for(a in d){if(d.hasOwnProperty(a)){c[a]=d[a]}}d=b.modified;c=b.modifiedSave={};for(a in d){if(d.hasOwnProperty(a)){c[a]=d[a]}}}},cancelEdit:function(){var a=this;if(a.editing){a.editing=false;a.modified=a.modifiedSave;a[a.persistenceProperty]=a.dataSave;a.dirty=a.dirtySave;a.modifiedSave=a.dataSave=a.dirtySave=null}},endEdit:function(a,d){var c=this,b,e;a=a===true;if(c.editing){c.editing=false;b=c.dataSave;c.modifiedSave=c.dataSave=c.dirtySave=null;if(!a){if(!d){d=c.getModifiedFieldNames(b)}e=c.dirty||d.length>0;if(e){c.afterEdit(d)}}}},getModifiedFieldNames:function(d){var c=this,e=c[c.persistenceProperty],a=[],b;d=d||c.dataSave;for(b in e){if(e.hasOwnProperty(b)){if(!c.isEqual(e[b],d[b])){a.push(b)}}}return a},getChanges:function(){var a=this.modified,b={},c;for(c in a){if(a.hasOwnProperty(c)){b[c]=this.get(c)}}return b},isModified:function(a){return this.modified.hasOwnProperty(a)},setDirty:function(){var c=this,a=c.fields.items,g=a.length,e,b,d;c.dirty=true;for(d=0;d<g;d++){e=a[d];if(e.persist){b=e.name;c.modified[b]=c.get(b)}}},reject:function(a){var c=this,b=c.modified,d;for(d in b){if(b.hasOwnProperty(d)){if(typeof b[d]!="function"){c[c.persistenceProperty][d]=b[d]}}}c.dirty=false;c.editing=false;c.modified={};if(a!==true){c.afterReject()}},commit:function(a,c){var b=this;b.phantom=b.dirty=b.editing=false;b.modified={};if(a!==true){b.afterCommit(c)}},copy:function(a){var b=this;return new b.self(b.raw,a,null,Ext.apply({},b[b.persistenceProperty]))},setProxy:function(a){if(!a.isProxy){if(typeof a==="string"){a={type:a}}a=Ext.createByAlias("proxy."+a.type,a)}a.setModel(this.self);this.proxy=a;return a},getProxy:function(){return this.hasOwnProperty("proxy")?this.proxy:this.self.getProxy()},validate:function(){var k=new Ext.data.Errors(),c=this.validations,e=Ext.data.validations,b,d,j,a,h,g;if(c){b=c.length;for(g=0;g<b;g++){d=c[g];j=d.field||d.name;h=d.type;a=e[h](d,this.get(j));if(!a){k.add({field:j,message:d.message||e[h+"Message"]})}}}return k},isValid:function(){return this.validate().isValid()},save:function(m){m=Ext.apply({},m);var g=this,b=g.phantom?"create":"update",l=m.scope||g,j=g.stores,c=0,e,h,d,a,k;Ext.apply(m,{records:[g],action:b});a=new Ext.data.Operation(m);k=function(i){d=[g,i];if(i.wasSuccessful()){for(e=j.length;c<e;c++){h=j[c];h.fireEvent("write",h,i);h.fireEvent("datachanged",h)}Ext.callback(m.success,l,d)}else{Ext.callback(m.failure,l,d)}Ext.callback(m.callback,l,d)};g.getProxy()[b](a,k,g);return g},destroy:function(m){m=Ext.apply({records:[this],action:"destroy"},m);var g=this,a=g.phantom!==true,l=m.scope||g,j,c=0,e,h,d,b,k;b=new Ext.data.Operation(m);k=function(i){d=[g,i];j=Ext.Array.clone(g.stores);if(i.wasSuccessful()){for(e=j.length;c<e;c++){h=j[c];if(h.remove){h.remove(g,true)}if(a){h.fireEvent("write",h,i)}}g.clearListeners();Ext.callback(m.success,l,d)}else{Ext.callback(m.failure,l,d)}Ext.callback(m.callback,l,d)};if(a){g.getProxy().destroy(b,k,g)}else{b.complete=b.success=true;b.resultSet=g.getProxy().reader.nullResultSet;k(b)}return g},getId:function(){return this.get(this.idField.name)},getObservableId:function(){return this.id},setId:function(a){this.set(this.idProperty,a)},changeId:function(g,b){var e=this,d,c,a;if(!e.preventInternalUpdate){d=e.hasId(g);c=e.hasId(b);a=e.internalId;e.phantom=!c;if(c!==d||(c&&d)){e.internalId=c?b:Ext.data.Model.id(e)}e.fireEvent("idchanged",e,g,b,a);e.callStore("onIdChanged",g,b,a)}},hasId:function(a){if(arguments.length===0){a=this.getId()}return !!(a||a===0)},join:function(a){var b=this;if(!b.stores.length){b.stores[0]=a}else{Ext.Array.include(this.stores,a)}this.store=this.stores[0]},unjoin:function(a){Ext.Array.remove(this.stores,a);this.store=this.stores[0]||null},afterEdit:function(a){this.callStore("afterEdit",a)},afterReject:function(){this.callStore("afterReject")},afterCommit:function(a){this.callStore("afterCommit",a)},callStore:function(g){var d=Ext.Array.clone(arguments),b=this.stores,e=0,a=b.length,c;d[0]=this;for(;e<a;++e){c=b[e];if(c&&Ext.isFunction(c[g])){c[g].apply(c,d)}}},getData:function(c){var d=this,a=d.fields.items,h=a.length,g={},b,e;for(e=0;e<h;e++){b=a[e].name;g[b]=d.get(b)}if(c===true){Ext.apply(g,d.getAssociatedData())}return g},getAssociatedData:function(){return this.prepareAssociatedData({},1)},prepareAssociatedData:function(w,z){var y=this,t=y.associations.items,e=t.length,x={},q=[],v=[],m=[],p,b,a,n,g,l,k,u,h,c,s,r,d,A;for(s=0;s<e;s++){c=t[s];u=c.associationId;k=w[u];if(k&&k!==z){continue}w[u]=z;d=c.type;A=c.name;if(d=="hasMany"){p=y[c.storeName];x[A]=[];if(p&&p.getCount()>0){b=p.data.items;h=b.length;for(r=0;r<h;r++){a=b[r];x[A][r]=a.getData();q.push(a);v.push(A);m.push(r)}}}else{if(d=="belongsTo"||d=="hasOne"){a=y[c.instanceName];if(a!==undefined){x[A]=a.getData();q.push(a);v.push(A);m.push(-1)}}}}for(s=0,h=q.length;s<h;++s){a=q[s];n=x[v[s]];g=m[s];l=a.prepareAssociatedData(w,z+1);if(g===-1){Ext.apply(n,l)}else{Ext.apply(n[g],l)}}return x}});Ext.define("Ext.data.proxy.Server",{extend:Ext.data.proxy.Proxy,alias:"proxy.server",alternateClassName:"Ext.data.ServerProxy",pageParam:"page",startParam:"start",limitParam:"limit",groupParam:"group",groupDirectionParam:"groupDir",sortParam:"sort",filterParam:"filter",directionParam:"dir",idParam:"id",simpleSortMode:false,simpleGroupMode:false,noCache:true,cacheString:"_dc",timeout:30000,constructor:function(a){var b=this;a=a||{};b.callParent([a]);b.extraParams=a.extraParams||{};b.api=Ext.apply({},a.api||b.api);b.nocache=b.noCache},create:function(){return this.doRequest.apply(this,arguments)},read:function(){return this.doRequest.apply(this,arguments)},update:function(){return this.doRequest.apply(this,arguments)},destroy:function(){return this.doRequest.apply(this,arguments)},setExtraParam:function(a,b){this.extraParams[a]=b},buildRequest:function(a){var c=this,d=a.params=Ext.apply({},a.params,c.extraParams),b;Ext.applyIf(d,c.getParams(a));if(a.id!==undefined&&d[c.idParam]===undefined){d[c.idParam]=a.id}b=new Ext.data.Request({params:d,action:a.action,records:a.records,operation:a,url:a.url,proxy:c});b.url=c.buildUrl(b);a.request=b;return b},processResponse:function(h,a,c,b,g,i){var e=this,d,j;if(h===true){d=e.getReader();d.applyDefaults=a.action==="read";j=d.read(e.extractResponseData(b));if(j.success!==false){Ext.apply(a,{response:b,resultSet:j});a.commitRecords(j.records);a.setCompleted();a.setSuccessful()}else{a.setException(j.message);e.fireEvent("exception",this,b,a)}}else{e.setException(a,b);e.fireEvent("exception",this,b,a)}if(typeof g=="function"){g.call(i||e,a)}e.afterRequest(c,h)},setException:function(b,a){b.setException({status:a.status,statusText:a.statusText})},extractResponseData:Ext.identityFn,applyEncoding:function(a){return Ext.encode(a)},encodeSorters:function(d){var b=[],c=d.length,a=0;for(;a<c;a++){b[a]={property:d[a].property,direction:d[a].direction}}return this.applyEncoding(b)},encodeFilters:function(d){var b=[],c=d.length,a=0;for(;a<c;a++){b[a]={property:d[a].property,value:d[a].value}}return this.applyEncoding(b)},getParams:function(p){var w=this,v={},s=Ext.isDefined,t=p.groupers,a=p.sorters,n=p.filters,i=p.page,h=p.start,u=p.limit,l=w.simpleSortMode,d=w.simpleGroupMode,r=w.pageParam,g=w.startParam,b=w.limitParam,c=w.groupParam,m=w.groupDirectionParam,e=w.sortParam,q=w.filterParam,o=w.directionParam,k,j;if(r&&s(i)){v[r]=i}if(g&&s(h)){v[g]=h}if(b&&s(u)){v[b]=u}k=c&&t&&t.length>0;if(k){if(d){v[c]=t[0].property;v[m]=t[0].direction||"ASC"}else{v[c]=w.encodeSorters(t)}}if(e&&a&&a.length>0){if(l){j=0;if(a.length>1&&k){j=1}v[e]=a[j].property;v[o]=a[j].direction}else{v[e]=w.encodeSorters(a)}}if(q&&n&&n.length>0){v[q]=w.encodeFilters(n)}return v},buildUrl:function(c){var b=this,a=b.getUrl(c);if(b.noCache){a=Ext.urlAppend(a,Ext.String.format("{0}={1}",b.cacheString,Ext.Date.now()))}return a},getUrl:function(a){return a.url||this.api[a.action]||this.url},doRequest:function(a,c,b){},afterRequest:Ext.emptyFn,onDestroy:function(){Ext.destroy(this.reader,this.writer)}});Ext.define("Ext.data.proxy.Ajax",{extend:Ext.data.proxy.Server,alias:"proxy.ajax",alternateClassName:["Ext.data.HttpProxy","Ext.data.AjaxProxy"],actionMethods:{create:"POST",read:"GET",update:"POST",destroy:"POST"},binary:false,doRequest:function(a,e,b){var d=this.getWriter(),c=this.buildRequest(a);if(a.allowWrite()){c=d.write(c)}Ext.apply(c,{binary:this.binary,headers:this.headers,timeout:this.timeout,scope:this,callback:this.createRequestCallback(c,a,e,b),method:this.getMethod(c),disableCaching:false});Ext.Ajax.request(c);return c},getMethod:function(a){return this.actionMethods[a.action]},createRequestCallback:function(d,a,e,b){var c=this;return function(h,i,g){c.processResponse(i,a,d,g,e,b)}}},function(){Ext.data.HttpProxy=this});Ext.define("Ext.data.proxy.Client",{extend:Ext.data.proxy.Proxy,alternateClassName:"Ext.data.ClientProxy",isSynchronous:true,clear:function(){}});Ext.define("Ext.data.proxy.Memory",{extend:Ext.data.proxy.Client,alias:"proxy.memory",alternateClassName:"Ext.data.MemoryProxy",constructor:function(a){this.callParent([a]);this.setReader(this.reader)},updateOperation:function(b,g,d){var c=0,e=b.getRecords(),a=e.length;for(c;c<a;c++){e[c].commit()}b.setCompleted();b.setSuccessful();Ext.callback(g,d||this,[b])},create:function(){this.updateOperation.apply(this,arguments)},update:function(){this.updateOperation.apply(this,arguments)},destroy:function(){this.updateOperation.apply(this,arguments)},read:function(c,i,j){var g=this,h=c.resultSet=g.getReader().read(g.data),b=h.records,e=c.sorters,d=c.groupers,a=c.filters;c.setCompleted();if(h.success){if(a&&a.length){b=h.records=Ext.Array.filter(b,Ext.util.Filter.createFilterFn(a))}if(d&&d.length){Ext.Array.insert(e||[],0,d)}if(e&&e.length){h.records=Ext.Array.sort(b,Ext.util.Sortable.createComparator(e))}if(g.enablePaging&&c.start!==undefined&&c.limit!==undefined){if(c.start>=h.total){h.success=false;h.count=0;h.records=[]}else{h.records=Ext.Array.slice(h.records,c.start,c.start+c.limit);h.count=h.records.length}}}if(h.success){c.setSuccessful()}else{g.fireEvent("exception",g,null,c)}Ext.callback(i,j||g,[c])},clear:Ext.emptyFn});Ext.define("Ext.util.LruCache",{extend:Ext.util.HashMap,constructor:function(a){Ext.apply(this,a);this.callParent([a])},add:function(b,e){var d=this,a=d.findKey(e),c;if(a){d.unlinkEntry(c=d.map[a]);c.prev=d.last;c.next=null}else{c={prev:d.last,next:null,key:b,value:e}}if(d.last){d.last.next=c}else{d.first=c}d.last=c;d.callParent([b,c]);d.prune();return e},insertBefore:function(b,g,c){var e=this,a,d;if(c=this.map[this.findKey(c)]){a=e.findKey(g);if(a){e.unlinkEntry(d=e.map[a])}else{d={prev:c.prev,next:c,key:b,value:g}}if(c.prev){d.prev.next=d}else{e.first=d}d.next=c;c.prev=d;e.prune();return g}else{return e.add(b,g)}},get:function(a){var b=this.map[a];if(b){if(b.next){this.moveToEnd(b)}return b.value}},removeAtKey:function(a){this.unlinkEntry(this.map[a]);return this.callParent(arguments)},clear:function(a){this.first=this.last=null;return this.callParent(arguments)},unlinkEntry:function(a){if(a){if(a.next){a.next.prev=a.prev}else{this.last=a.prev}if(a.prev){a.prev.next=a.next}else{this.first=a.next}a.prev=a.next=null}},moveToEnd:function(a){this.unlinkEntry(a);if(a.prev=this.last){this.last.next=a}else{this.first=a}this.last=a},getArray:function(c){var a=[],b=this.first;while(b){a.push(c?b.key:b.value);b=b.next}return a},each:function(c,b,a){var g=this,e=a?g.last:g.first,d=g.length;b=b||g;while(e){if(c.call(b,e.key,e.value,d)===false){break}e=a?e.prev:e.next}return g},findKey:function(b){var a,c=this.map;for(a in c){if(c.hasOwnProperty(a)&&c[a].value===b){return a}}return undefined},clone:function(){var a=new this.self(this.initialConfig),c=this.map,b;a.suspendEvents();for(b in c){if(c.hasOwnProperty(b)){a.add(b,c[b].value)}}a.resumeEvents();return a},prune:function(){var a=this,b=a.maxSize?(a.length-a.maxSize):0;if(b>0){for(;a.first&&b;b--){a.removeAtKey(a.first.key)}}}});Ext.define("Ext.data.Group",{extend:Ext.util.Observable,key:undefined,dirty:true,constructor:function(){this.callParent(arguments);this.records=[]},contains:function(a){return Ext.Array.indexOf(this.records,a)},add:function(a){Ext.Array.push(this.records,a);this.dirty=true},remove:function(b){if(!Ext.isArray(b)){b=[b]}var a=b.length,c;for(c=0;c<a;++c){Ext.Array.remove(this.records,b[c])}this.dirty=true},isDirty:function(){return this.dirty},hasAggregate:function(){return !!this.aggregate},setDirty:function(){this.dirty=true},commit:function(){this.dirty=false},isCollapsed:function(){return this.collapsed},getAggregateRecord:function(a){var b=this,c;if(a===true||b.dirty||!b.aggregate){c=b.store.model;b.aggregate=new c();b.aggregate.isSummary=true}return b.aggregate}});Ext.define("Ext.data.Store",{extend:Ext.data.AbstractStore,alias:"store.store",remoteSort:false,remoteFilter:false,remoteGroup:false,groupField:undefined,groupDir:"ASC",trailingBufferZone:25,leadingBufferZone:200,pageSize:undefined,currentPage:1,clearOnPageLoad:true,loading:false,sortOnFilter:true,buffered:false,purgePageCount:5,clearRemovedOnLoad:true,defaultPageSize:25,defaultViewSize:100,addRecordsOptions:{addRecords:true},statics:{recordIdFn:function(a){return a.internalId},recordIndexFn:function(a){return a.index},grouperIdFn:function(a){return a.id||a.property},groupIdFn:function(a){return a.key}},constructor:function(b){b=Ext.apply({},b);var d=this,g=b.groupers||d.groupers,a=b.groupField||d.groupField,c,e;e=b.data||d.data;if(e){d.inlineData=e;delete b.data}if(!g&&a){g=[{property:a,direction:b.groupDir||d.groupDir}]}delete b.groupers;d.groupers=new Ext.util.MixedCollection(false,Ext.data.Store.grouperIdFn);d.groupers.addAll(d.decodeGroupers(g));d.groups=new Ext.util.MixedCollection(false,Ext.data.Store.groupIdFn);d.callParent([b]);if(d.buffered){d.data=new d.PageMap({store:d,keyFn:Ext.data.Store.recordIdFn,pageSize:d.pageSize,maxSize:d.purgePageCount,listeners:{clear:d.onPageMapClear,scope:d}});d.pageRequests={};d.remoteSort=d.remoteGroup=d.remoteFilter=true;d.sortOnLoad=false;d.filterOnLoad=false}else{d.data=new Ext.util.MixedCollection({getKey:Ext.data.Store.recordIdFn,maintainIndices:true});d.data.pageSize=d.pageSize}if(d.remoteGroup){d.remoteSort=true}c=d.proxy;e=d.inlineData;if(!d.buffered&&!d.pageSize){d.pageSize=d.defaultPageSize}if(e){if(c instanceof Ext.data.proxy.Memory){c.data=e;d.read()}else{d.add.apply(d,[e])}if(!d.remoteSort){d.sort()}delete d.inlineData}else{if(d.autoLoad){Ext.defer(d.load,1,d,[typeof d.autoLoad==="object"?d.autoLoad:undefined])}}if(d.groupers.items.length&&!d.remoteGroup){d.group(null,null,true)}},onBeforeSort:function(){var a=this.groupers;if(a.getCount()>0){this.sort(a.items,"prepend",false)}},decodeGroupers:function(e){if(!Ext.isArray(e)){if(e===undefined){e=[]}else{e=[e]}}var d=e.length,g=Ext.util.Grouper,b,c,a=[];for(c=0;c<d;c++){b=e[c];if(!(b instanceof g)){if(Ext.isString(b)){b={property:b}}b=Ext.apply({root:"data",direction:"ASC"},b);if(b.fn){b.sorterFn=b.fn}if(typeof b=="function"){b={sorterFn:b}}a.push(new g(b))}else{a.push(b)}}return a},group:function(c,j,k){var e=this,a,b,g=e.groupers.getRange(),d,h=g.length;for(d=0;d<h;d++){e.sorters.remove(g[d])}if(Ext.isArray(c)){b=c}else{if(Ext.isObject(c)){b=[c]}else{if(Ext.isString(c)){a=e.groupers.get(c);if(!a){a={property:c,direction:j||"ASC"};b=[a]}else{if(j===undefined){a.toggle()}else{a.setDirection(j)}}}}}if(b&&b.length){e.groupers.clear();e.groupers.addAll(e.decodeGroupers(b))}e.sorters.insert(0,e.groupers.getRange());if(e.remoteGroup){if(e.buffered){e.data.clear();e.loadPage(1,{groupChange:true})}else{e.load({scope:e,callback:k?null:e.fireGroupChange})}}else{e.doSort(e.generateComparator());e.constructGroups();if(!k){e.fireGroupChange()}}},getGroupField:function(){var b=this.groupers.first(),a;if(b){a=b.property}return a},constructGroups:function(){var e=this,g=this.data.items,c=g.length,b=e.groups,a,d,h,j;b.clear();for(d=0;d<c;++d){j=g[d];a=e.getGroupString(j);h=b.get(a);if(!h){h=new Ext.data.Group({key:a,store:e});b.add(a,h)}h.add(j)}},clearGrouping:function(){var c=this,d=c.groupers.items,b=d.length,a;for(a=0;a<b;a++){c.sorters.remove(d[a])}c.groupers.clear();if(c.remoteGroup){if(c.buffered){c.data.clear();c.loadPage(1,{groupChange:true})}else{c.load({scope:c,callback:c.fireGroupChange})}}else{c.groups.clear();if(c.sorters.length){c.sort()}else{c.fireEvent("datachanged",c);c.fireEvent("refresh",c)}c.fireGroupChange()}},isGrouped:function(){return this.groupers.getCount()>0},fireGroupChange:function(){this.fireEvent("groupchange",this,this.groupers)},getGroups:function(b){var d=this.data.items,a=d.length,c=[],k={},g,h,j,e;for(e=0;e<a;e++){g=d[e];h=this.getGroupString(g);j=k[h];if(j===undefined){j={name:h,children:[]};c.push(j);k[h]=j}j.children.push(g)}return b?k[b]:c},getGroupsForGrouper:function(g,b){var d=g.length,e=[],a,c,j,k,h;for(h=0;h<d;h++){j=g[h];c=b.getGroupString(j);if(c!==a){k={name:c,grouper:b,records:[]};e.push(k)}k.records.push(j);a=c}return e},getGroupsForGrouperIndex:function(c,j){var g=this,h=g.groupers,b=h.getAt(j),a=g.getGroupsForGrouper(c,b),e=a.length,d;if(j+1<h.length){for(d=0;d<e;d++){a[d].children=g.getGroupsForGrouperIndex(a[d].records,j+1)}}for(d=0;d<e;d++){a[d].depth=j}return a},getGroupData:function(a){var b=this;if(a!==false){b.sort()}return b.getGroupsForGrouperIndex(b.data.items,0)},getGroupString:function(a){var b=this.groupers.first();if(b){return b.getGroupString(a)}return""},insert:function(g,a){var j=this,k=false,d,h,e,b=j.modelDefaults,c;if(!Ext.isIterable(a)){c=a=[a]}else{c=[]}h=a.length;if(h){for(d=0;d<h;d++){e=a[d];if(!e.isModel){e=j.createModel(e)}c[d]=e;if(b){e.set(b)}e.join(j);k=k||e.phantom===true}j.data.insert(g,c);if(j.snapshot){j.snapshot.addAll(c)}if(j.requireSort){j.suspendEvents();j.sort();j.resumeEvents()}if(j.isGrouped()){j.updateGroupsOnAdd(c)}j.fireEvent("add",j,c,g);j.fireEvent("datachanged",j);if(j.autoSync&&k&&!j.autoSyncSuspended){j.sync()}}return c},updateGroupsOnAdd:function(c){var e=this,b=e.groups,a=c.length,d,j,g,h;for(d=0;d<a;++d){h=c[d];j=e.getGroupString(h);g=b.getByKey(j);if(!g){g=b.add(new Ext.data.Group({key:j,store:e}))}g.add(h)}},updateGroupsOnRemove:function(c){var e=this,b=e.groups,a=c.length,d,j,g,h;for(d=0;d<a;++d){h=c[d];j=e.getGroupString(h);g=b.getByKey(j);if(g){g.remove(h);if(g.records.length===0){b.remove(g)}}}},updateGroupsOnUpdate:function(e,c){var j=this,a=j.getGroupField(),l=j.getGroupString(e),b=j.groups,g,d,h,k;if(c&&Ext.Array.indexOf(c,a)!==-1){h=b.items;for(d=0,g=h.length;d<g;++d){k=h[d];if(k.contains(e)){k.remove(e);break}}b.getByKey(l);if(!k){k=b.add(new Ext.data.Group({key:l,store:j}))}k.add(e);j.suspendEvents();j.remove(e);j.addSorted(e);j.resumeEvents()}else{b.getByKey(l).setDirty()}},add:function(a){var d=this,b,c,e;if(Ext.isArray(a)){b=a}else{b=arguments}c=b.length;e=!d.remoteSort&&d.sorters&&d.sorters.items.length;if(e&&c===1){return[d.addSorted(d.createModel(b[0]))]}if(e){d.requireSort=true}b=d.insert(d.data.length,b);delete d.requireSort;return b},addSorted:function(a){var c=this,b=c.data.findInsertionIndex(a,c.generateComparator());c.insert(b,a);return a},createModel:function(a){if(!a.isModel){a=Ext.ModelManager.create(a,this.model)}return a},onUpdate:function(a,b,c){if(this.isGrouped()){this.updateGroupsOnUpdate(a,c)}},each:function(e,c){var g=this.data.items,b=g.length,a,h;for(h=0;h<b;h++){a=g[h];if(e.call(c||a,a,h,b)===false){break}}},remove:function(o,l,p){l=l===true;var t=this,j=false,d=t.snapshot,u=t.data,n=0,c,q=[],s=[],e=[],r,m,g,b,k,h,a=!p&&t.hasListeners.remove;if(o.isModel){o=[o];c=1}else{if(Ext.isIterable(o)){c=o.length}else{if(typeof o==="object"){k=true;n=o.start;c=o.end+1;h=c-n}}}if(!k){for(n=0;n<c;++n){b=o[n];if(typeof b=="number"){g=b;b=u.getAt(g)}else{g=t.indexOf(b)}if(b&&g>-1){q.push({record:b,index:g})}if(d){d.remove(b)}}q=Ext.Array.sort(q,function(v,i){var x=v.index,w=i.index;return x===i.index2?0:(x<w?-1:1)});n=0;c=q.length}for(;n<c;n++){if(k){b=u.getAt(n);g=n}else{r=q[n];b=r.record;g=r.index}s.push(b);e.push(g);m=b.phantom!==true;if(!l&&m){b.removedFrom=g;t.removed.push(b)}b.unjoin(t);g-=n;j=j||m;if(!k){u.removeAt(g);if(a){t.fireEvent("remove",t,b,g,!!l)}}}if(k){u.removeRange(o.start,h)}if(!p){t.fireEvent("bulkremove",t,s,e,!!l);t.fireEvent("datachanged",t)}if(!l&&t.autoSync&&j&&!t.autoSyncSuspended){t.sync()}},removeAt:function(a,c){var b=this,d=b.getCount();if(a<=d){if(arguments.length===1){b.remove([a])}else{if(c){b.remove({start:a,end:Math.min(a+c,d)-1})}}}},removeAll:function(a){var b=this;b.remove({start:0,end:b.getCount()-1},false,a);if(b.data){b.data.clear()}if(a!==true){b.fireEvent("clear",b)}},load:function(a){var b=this;a=a||{};if(typeof a=="function"){a={callback:a}}a.groupers=a.groupers||b.groupers.items;a.page=a.page||b.currentPage;a.start=(a.start!==undefined)?a.start:(a.page-1)*b.pageSize;a.limit=a.limit||b.pageSize;a.addRecords=a.addRecords||false;if(b.buffered){a.limit=b.viewSize||b.defaultViewSize;return b.loadToPrefetch(a)}return b.callParent([a])},reload:function(m){var h=this,j,b,g,l,d,a,k,c,e=h.getCount();if(!m){m={}}if(h.buffered){delete h.totalCount;a=function(){if(h.rangeCached(j,b)){h.loading=false;h.data.un("pageAdded",a);c=h.data.getRange(j,b);h.fireEvent("load",h,c,true)}};k=Math.ceil((h.leadingBufferZone+h.trailingBufferZone)/2);j=m.start||(e?h.getAt(0).index:0);b=j+(m.count||(e?e:h.pageSize))-1;g=h.getPageFromRecordIndex(Math.max(j-k,0));l=h.getPageFromRecordIndex(b+k);h.data.clear(true);if(h.fireEvent("beforeload",h,m)!==false){h.loading=true;h.data.on("pageAdded",a);for(d=g;d<=l;d++){h.prefetchPage(d,m)}}}else{return h.callParent(arguments)}},onProxyLoad:function(b){var d=this,c=b.getResultSet(),a=b.getRecords(),e=b.wasSuccessful();if(c){d.totalCount=c.total}d.loading=false;if(e){d.loadRecords(a,b)}if(d.hasListeners.load){d.fireEvent("load",d,a,e)}if(d.hasListeners.read){d.fireEvent("read",d,a,e)}Ext.callback(b.callback,b.scope||d,[a,b,e])},getNewRecords:function(){return this.data.filterBy(this.filterNew).items},getUpdatedRecords:function(){return this.data.filterBy(this.filterUpdated).items},filter:function(e,g){if(Ext.isString(e)){e={property:e,value:g}}var d=this,a=d.decodeFilters(e),b,h=d.sorters.length&&d.sortOnFilter&&!d.remoteSort,c=a.length;for(b=0;b<c;b++){d.filters.replace(a[b])}if(d.remoteFilter){delete d.totalCount;if(d.buffered){d.data.clear();d.loadPage(1)}else{d.currentPage=1;d.load()}}else{if(d.filters.getCount()){d.snapshot=d.snapshot||d.data.clone();d.data=d.snapshot.filter(d.filters.items);d.constructGroups();if(h){d.sort()}else{d.fireEvent("datachanged",d);d.fireEvent("refresh",d)}}}d.fireEvent("filterchange",d,d.filters.items)},clearFilter:function(a){var b=this;b.filters.clear();if(b.remoteFilter){if(a){return}delete b.totalCount;if(b.buffered){b.data.clear();b.loadPage(1)}else{b.currentPage=1;b.load()}}else{if(b.isFiltered()){b.data=b.snapshot;delete b.snapshot;b.constructGroups();if(a!==true){b.fireEvent("datachanged",b);b.fireEvent("refresh",b)}}}b.fireEvent("filterchange",b,b.filters.items)},removeFilter:function(b,a){var c=this;if(!c.remoteFilter&&c.isFiltered()){if(b instanceof Ext.util.Filter){c.filters.remove(b)}else{c.filters.removeAtKey(b)}if(a!==false){if(c.filters.getCount()){c.filter()}else{c.clearFilter()}}c.fireEvent("filterchange",c,c.filters.items)}},addFilter:function(g,a){var e=this,b,c,d;b=e.decodeFilters(g);d=b.length;for(c=0;c<d;c++){e.filters.replace(b[c])}if(a!==false){e.filter()}e.fireEvent("filterchange",e,e.filters.items)},isFiltered:function(){var a=this.snapshot;return !!(a&&a!==this.data)},filterBy:function(b,a){var c=this;c.snapshot=c.snapshot||c.data.clone();c.data=c.queryBy(b,a||c);c.fireEvent("datachanged",c);c.fireEvent("refresh",c)},queryBy:function(b,a){var c=this;return(c.snapshot||c.data).filterBy(b,a||c)},query:function(h,g,i,a,e){var d=this,b=d.createFilterFn(h,g,i,a,e),c=d.queryBy(b);if(!c){c=new Ext.util.MixedCollection()}return c},loadData:function(e,a){var d=e.length,c=[],b;for(b=0;b<d;b++){c.push(this.createModel(e[b]))}this.loadRecords(c,a?this.addRecordsOptions:undefined)},loadRawData:function(e,b){var d=this,a=d.proxy.reader.read(e),c=a.records;if(a.success){d.totalCount=a.total;d.loadRecords(c,b?d.addRecordsOptions:undefined)}},loadRecords:function(b,c){var h=this,d=0,g=b.length,j,e,a=h.snapshot;if(c){j=c.start;e=c.addRecords}if(!e){delete h.snapshot;h.clearData(true)}else{if(a){a.addAll(b)}}h.data.addAll(b);if(j!==undefined){for(;d<g;d++){b[d].index=j+d;b[d].join(h)}}else{for(;d<g;d++){b[d].join(h)}}h.suspendEvents();if(h.filterOnLoad&&!h.remoteFilter){h.filter()}if(h.sortOnLoad&&!h.remoteSort){h.sort(undefined,undefined,undefined,true)}h.resumeEvents();if(h.isGrouped()){h.constructGroups()}h.fireEvent("datachanged",h);h.fireEvent("refresh",h)},loadPage:function(c,a){var b=this;b.currentPage=c;a=Ext.apply({page:c,start:(c-1)*b.pageSize,limit:b.pageSize,addRecords:!b.clearOnPageLoad},a);if(b.buffered){a.limit=b.viewSize||b.defaultViewSize;return b.loadToPrefetch(a)}b.read(a)},nextPage:function(a){this.loadPage(this.currentPage+1,a)},previousPage:function(a){this.loadPage(this.currentPage-1,a)},clearData:function(d){var c=this,a,b;if(!c.buffered){a=c.data.items;b=a.length;while(b--){a[b].unjoin(c)}}c.data.clear();if(d!==true||c.clearRemovedOnLoad){c.removed.length=0}},loadToPrefetch:function(n){var j=this,e,b,l,c=n,k=n.start,a=n.start+n.limit-1,g=Math.min(a,n.start+(j.viewSize||n.limit)-1),h=j.getPageFromRecordIndex(Math.max(k-j.trailingBufferZone,0)),m=j.getPageFromRecordIndex(a+j.leadingBufferZone),d=function(){if(j.rangeCached(k,g)){j.loading=false;b=j.data.getRange(k,g);j.data.un("pageAdded",d);if(j.hasListeners.guaranteedrange){j.guaranteeRange(k,g,n.callback,n.scope)}if(n.callback){n.callback.call(n.scope||j,b,k,a,n)}j.fireEvent("datachanged",j);j.fireEvent("refresh",j);j.fireEvent("load",j,b,true);if(n.groupChange){j.fireGroupChange()}}};if(j.fireEvent("beforeload",j,n)!==false){delete j.totalCount;j.loading=true;if(n.callback){c=Ext.apply({},n);delete n.callback}j.on("prefetch",function(o,p,i){if(p){if((l=j.getTotalCount())){j.data.on("pageAdded",d);g=Math.min(g,l-1);m=j.getPageFromRecordIndex(g);for(e=h+1;e<=m;++e){j.prefetchPage(e,c)}}else{j.fireEvent("datachanged",j);j.fireEvent("refresh",j);j.fireEvent("load",j,o,true)}}else{j.fireEvent("load",j,o,false)}},null,{single:true});j.prefetchPage(h,c)}},prefetch:function(c){var e=this,a=e.pageSize,d,b;if(a){if(e.lastPageSize&&a!=e.lastPageSize){Ext.Error.raise("pageSize cannot be dynamically altered")}if(!e.data.pageSize){e.data.pageSize=a}}else{e.pageSize=e.data.pageSize=a=c.limit}e.lastPageSize=a;if(!c.page){c.page=e.getPageFromRecordIndex(c.start);c.start=(c.page-1)*a;c.limit=Math.ceil(c.limit/a)*a}if(!e.pageRequests[c.page]){c=Ext.apply({action:"read",filters:e.filters.items,sorters:e.sorters.items,groupers:e.groupers.items,generation:e.data.generation},c);b=new Ext.data.Operation(c);if(e.fireEvent("beforeprefetch",e,b)!==false){d=e.proxy;e.pageRequests[c.page]=d.read(b,e.onProxyPrefetch,e);if(d.isSynchronous){delete e.pageRequests[c.page]}}}return e},onPageMapClear:function(){var d=this,c=d.wasLoading,a=d.pageRequests,b,e;if(d.data.events.pageadded){d.data.events.pageadded.clearListeners()}d.loading=true;d.totalCount=0;for(e in a){if(a.hasOwnProperty(e)){b=a[e];delete a[e];delete b.callback}}d.fireEvent("clear",d);d.loading=c},prefetchPage:function(e,b){var d=this,a=d.pageSize||d.defaultPageSize,g=(e-1)*d.pageSize,c=d.totalCount;if(c!==undefined&&d.getCount()===c){return}d.prefetch(Ext.applyIf({page:e,start:g,limit:a},b))},onProxyPrefetch:function(b){var d=this,c=b.getResultSet(),a=b.getRecords(),g=b.wasSuccessful(),e=b.page;if(b.generation===d.data.generation){if(c){d.totalCount=c.total;d.fireEvent("totalcountchange",d.totalCount)}if(e!==undefined){delete d.pageRequests[e]}d.loading=false;d.fireEvent("prefetch",d,a,g,b);if(g){d.cachePage(a,b.page)}Ext.callback(b.callback,b.scope||d,[a,b,g])}},cachePage:function(b,e){var d=this,a=b.length,c;if(!Ext.isDefined(d.totalCount)){d.totalCount=b.length;d.fireEvent("totalcountchange",d.totalCount)}for(c=0;c<a;c++){b[c].join(d)}d.data.addPage(e,b)},rangeCached:function(b,a){return this.data&&this.data.hasRange(b,a)},pageCached:function(a){return this.data&&this.data.hasPage(a)},rangeSatisfied:function(b,a){return this.rangeCached(b,a)},getPageFromRecordIndex:function(a){return Math.floor(a/this.pageSize)+1},onGuaranteedRange:function(d){var e=this,b=e.getTotalCount(),g=d.prefetchStart,a=(d.prefetchEnd>b-1)?b-1:d.prefetchEnd,c;a=Math.max(0,a);c=e.data.getRange(g,a);if(d.fireEvent!==false){e.fireEvent("guaranteedrange",c,g,a,d)}if(d.callback){d.callback.call(d.scope||e,c,g,a,d)}},guaranteeRange:function(e,a,d,c,b){b=Ext.apply({callback:d,scope:c},b);this.getRange(e,a,b)},prefetchRange:function(g,b){var d=this,c,a,e;if(!d.rangeCached(g,b)){c=d.getPageFromRecordIndex(g);a=d.getPageFromRecordIndex(b);d.data.maxSize=d.purgePageCount?(a-c+1)+d.purgePageCount:0;for(e=c;e<=a;e++){if(!d.pageCached(e)){d.prefetchPage(e)}}}},primeCache:function(d,a,c){var b=this;if(c===-1){d=Math.max(d-b.leadingBufferZone,0);a=Math.min(a+b.trailingBufferZone,b.totalCount-1)}else{if(c===1){d=Math.max(Math.min(d-b.trailingBufferZone,b.totalCount-b.pageSize),0);a=Math.min(a+b.leadingBufferZone,b.totalCount-1)}else{d=Math.min(Math.max(Math.floor(d-((b.leadingBufferZone+b.trailingBufferZone)/2)),0),b.totalCount-b.pageSize);a=Math.min(Math.max(Math.ceil(a+((b.leadingBufferZone+b.trailingBufferZone)/2)),0),b.totalCount-1)}}b.prefetchRange(d,a)},sort:function(){var a=this;if(a.buffered&&a.remoteSort){a.data.clear()}return a.callParent(arguments)},doSort:function(b){var e=this,a,d,c;if(e.remoteSort){if(e.buffered){e.data.clear();e.loadPage(1)}else{e.load()}}else{e.data.sortBy(b);if(!e.buffered){a=e.getRange();d=a.length;for(c=0;c<d;c++){a[c].index=c}}e.fireEvent("datachanged",e);e.fireEvent("refresh",e)}},find:function(e,d,h,g,a,c){var b=this.createFilterFn(e,d,g,a,c);return b?this.data.findIndexBy(b,null,h):-1},findRecord:function(){var b=this,a=b.find.apply(b,arguments);return a!==-1?b.getAt(a):null},createFilterFn:function(d,c,e,a,b){if(Ext.isEmpty(c)){return false}c=this.data.createValueMatcher(c,e,a,b);return function(g){return c.test(g.data[d])}},findExact:function(b,a,c){return this.data.findIndexBy(function(d){return d.isEqual(d.get(b),a)},this,c)},findBy:function(b,a,c){return this.data.findIndexBy(b,a,c)},collect:function(b,a,c){var d=this,e=(c===true&&d.snapshot)?d.snapshot:d.data;return e.collect(b,"data",a)},getCount:function(){return this.data.getCount()},getTotalCount:function(){return this.totalCount||0},getAt:function(a){return this.data.getAt(a)},getRange:function(c,g,k){var h=this,i,b,d=h.totalCount-1,e=h.lastRequestStart,a,j;k=Ext.apply({prefetchStart:c,prefetchEnd:g},k);if(h.buffered){g=(g>=h.totalCount)?d:g;i=c===0?0:c-1;b=g===d?g:g+1;h.lastRequestStart=c;if(h.rangeCached(i,b)){h.onGuaranteedRange(k);j=h.data.getRange(c,g)}else{h.fireEvent("cachemiss",h,c,g);a=function(m,l){if(h.rangeCached(i,b)){h.fireEvent("cachefilled",h,c,g);h.data.un("pageAdded",a);h.onGuaranteedRange(k)}};h.data.on("pageAdded",a);h.prefetchRange(c,g)}h.primeCache(c,g,c<e?-1:1)}else{j=h.data.getRange(c,g);if(k.callback){k.callback.call(k.scope||h,j,c,g,k)}}return j},getById:function(b){var a=(this.snapshot||this.data).findBy(function(c){return c.getId()===b});return a},indexOf:function(a){return this.data.indexOf(a)},indexOfTotal:function(a){var b=a.index;if(b||b===0){return b}return this.indexOf(a)},indexOfId:function(a){return this.indexOf(this.getById(a))},first:function(a){var b=this;if(a&&b.isGrouped()){return b.aggregate(function(c){return c.length?c[0]:undefined},b,true)}else{return b.data.first()}},last:function(a){var b=this;if(a&&b.isGrouped()){return b.aggregate(function(d){var c=d.length;return c?d[c-1]:undefined},b,true)}else{return b.data.last()}},sum:function(c,a){var b=this;if(a&&b.isGrouped()){return b.aggregate(b.getSum,b,true,[c])}else{return b.getSum(b.data.items,c)}},getSum:function(b,e){var d=0,c=0,a=b.length;for(;c<a;++c){d+=b[c].get(e)}return d},count:function(a){var b=this;if(a&&b.isGrouped()){return b.aggregate(function(c){return c.length},b,true)}else{return b.getCount()}},min:function(c,a){var b=this;if(a&&b.isGrouped()){return b.aggregate(b.getMin,b,true,[c])}else{return b.getMin(b.data.items,c)}},getMin:function(b,g){var d=1,a=b.length,e,c;if(a>0){c=b[0].get(g)}for(;d<a;++d){e=b[d].get(g);if(e<c){c=e}}return c},max:function(c,a){var b=this;if(a&&b.isGrouped()){return b.aggregate(b.getMax,b,true,[c])}else{return b.getMax(b.data.items,c)}},getMax:function(c,g){var d=1,b=c.length,e,a;if(b>0){a=c[0].get(g)}for(;d<b;++d){e=c[d].get(g);if(e>a){a=e}}return a},average:function(c,a){var b=this;if(a&&b.isGrouped()){return b.aggregate(b.getAverage,b,true,[c])}else{return b.getAverage(b.data.items,c)}},getAverage:function(b,e){var c=0,a=b.length,d=0;if(b.length>0){for(;c<a;++c){d+=b[c].get(e)}return d/a}return 0},aggregate:function(h,k,e,g){g=g||[];if(e&&this.isGrouped()){var a=this.getGroups(),d=a.length,b={},j,c;for(c=0;c<d;++c){j=a[c];b[j.name]=this.getAggregate(h,k||this,j.children,g)}return b}else{return this.getAggregate(h,k,this.data.items,g)}},getAggregate:function(d,c,a,b){b=b||[];return d.apply(c||this,[a].concat(b))},onIdChanged:function(d,c,b,a){this.data.updateKey(a,b);this.callParent(arguments)},commitChanges:function(){var c=this,d=c.getModifiedRecords(),a=d.length,b=0;for(;b<a;b++){d[b].commit()}c.removed.length=0},filterNewOnly:function(a){return a.phantom===true},getRejectRecords:function(){return Ext.Array.push(this.data.filterBy(this.filterNewOnly).items,this.getUpdatedRecords())},rejectChanges:function(){var c=this,d=c.getRejectRecords(),a=d.length,b=0,e;for(;b<a;b++){e=d[b];e.reject();if(e.phantom){c.remove(e)}}d=c.removed;a=d.length;for(b=0;b<a;b++){e=d[b];c.insert(e.removedFrom||0,e);e.reject()}c.removed.length=0}},function(){Ext.regStore("ext-empty-store",{fields:[],proxy:"memory"});this.prototype.PageMap=new Ext.Class({extend:"Ext.util.LruCache",clear:function(a){var b=this;b.generation=(b.generation||0)+1;b.callParent(arguments)},forEach:function(k,l){var h=this,d=Ext.Object.getKeys(h.map),a=d.length,c,b,e,g;for(c=0;c<a;c++){d[c]=Number(d[c])}Ext.Array.sort(d);l=l||h;for(c=0;c<a;c++){e=h.getPage(d[c]);g=e.length;for(b=0;b<g;b++){if(k.call(l,e[b])===false){return}}}},findBy:function(c,b){var d=this,a=null;b=b||d;d.forEach(function(e){if(c.call(b,e)){a=e;return false}});return a},getPageFromRecordIndex:this.prototype.getPageFromRecordIndex,addAll:function(a){this.addPage(1,a)},addPage:function(a,b){var d=this,g=a+Math.floor((b.length-1)/d.pageSize),c,e;for(c=0;a<=g;a++,c+=d.pageSize){e=Ext.Array.slice(b,c,c+d.pageSize);d.add(a,e);d.fireEvent("pageAdded",a,e)}},getCount:function(){var a=this.callParent();if(a){a=(a-1)*this.pageSize+this.last.value.length}return a},indexOf:function(a){return a?a.index:-1},insert:function(){},remove:function(){},removeAt:function(){},getPage:function(a){return this.get(a)},hasRange:function(d,b){var a=this.getPageFromRecordIndex(d),c=this.getPageFromRecordIndex(b);for(;a<=c;a++){if(!this.hasPage(a)){return false}}return true},hasPage:function(a){return !!this.get(a)},getAt:function(a){return this.getRange(a,a)[0]},getRange:function(a,b){if(!this.hasRange(a,b)){Ext.Error.raise("PageMap asked for range which it does not have")}var j=this,m=j.getPageFromRecordIndex(a),e=j.getPageFromRecordIndex(b),c=(m-1)*j.pageSize,o=(e*j.pageSize)-1,k=m,p=[],n,h,l,d=0,g;for(;k<=e;k++){if(k==m){n=a-c;l=true}else{n=0;l=false}if(k==e){h=j.pageSize-(o-b);l=true}if(l){Ext.Array.push(p,Ext.Array.slice(j.getPage(k),n,h))}else{Ext.Array.push(p,j.getPage(k))}}for(g=p.length;d<g;d++){p[d].index=a++}return p}})});Ext.define("Ext.data.reader.Array",{extend:Ext.data.reader.Json,alternateClassName:"Ext.data.ArrayReader",alias:"reader.array",totalProperty:undefined,successProperty:undefined,createFieldAccessExpression:function(e,c,b){var d=(e.mapping==null)?e.originalIndex:e.mapping,a;if(typeof d==="function"){a=c+".mapping("+b+", this)"}else{if(isNaN(d)){d='"'+d+'"'}a=b+"["+d+"]"}return a}});Ext.define("Ext.data.ArrayStore",{extend:Ext.data.Store,alias:"store.array",constructor:function(a){a=Ext.apply({proxy:{type:"memory",reader:"array"}},a);this.callParent([a])},loadData:function(e,a){if(this.expandData===true){var d=[],b=0,c=e.length;for(;b<c;b++){d[d.length]=[e[b]]}e=d}this.callParent([e,a])}},function(){Ext.data.SimpleStore=Ext.data.ArrayStore});Ext.define("Ext.data.Batch",{mixins:{observable:Ext.util.Observable},autoStart:false,pauseOnException:false,current:-1,total:0,isRunning:false,isComplete:false,hasException:false,constructor:function(a){var b=this;b.mixins.observable.constructor.call(b,a);b.operations=[];b.exceptions=[]},add:function(a){this.total++;a.setBatch(this);this.operations.push(a);return this},start:function(a){var b=this;if(b.isRunning){return b}b.exceptions.length=0;b.hasException=false;b.isRunning=true;return b.runOperation(Ext.isDefined(a)?a:b.current+1)},retry:function(){return this.start(this.current)},runNextOperation:function(){return this.runOperation(this.current+1)},pause:function(){this.isRunning=false;return this},runOperation:function(d){var e=this,c=e.operations,b=c[d],a;if(b===undefined){e.isRunning=false;e.isComplete=true;e.fireEvent("complete",e,c[c.length-1])}else{e.current=d;a=function(g){var h=g.hasException();if(h){e.hasException=true;e.exceptions.push(g);e.fireEvent("exception",e,g)}if(h&&e.pauseOnException){e.pause()}else{g.setCompleted();e.fireEvent("operationcomplete",e,g);e.runNextOperation()}};b.setStarted();e.proxy[b.action](b,a,e)}return e}});Ext.define("Ext.data.BufferStore",{extend:Ext.data.Store,alias:"store.buffer",sortOnLoad:false,filterOnLoad:false,constructor:function(){Ext.Error.raise("The BufferStore class has been deprecated. Instead, specify the buffered config option on Ext.data.Store")}});Ext.define("Ext.direct.Manager",{singleton:true,mixins:{observable:Ext.util.Observable},exceptions:{TRANSPORT:"xhr",PARSE:"parse",LOGIN:"login",SERVER:"exception"},constructor:function(){var a=this;a.addEvents("event","exception");a.transactions=new Ext.util.MixedCollection();a.providers=new Ext.util.MixedCollection();a.mixins.observable.constructor.call(a)},addProvider:function(g){var d=this,b=arguments,e=d.relayers||(d.relayers={}),c,a;if(b.length>1){for(c=0,a=b.length;c<a;++c){d.addProvider(b[c])}return}if(!g.isProvider){g=Ext.create("direct."+g.type+"provider",g)}d.providers.add(g);g.on("data",d.onProviderData,d);if(g.relayedEvents){e[g.id]=d.relayEvents(g,g.relayedEvents)}if(!g.isConnected()){g.connect()}return g},getProvider:function(a){return a.isProvider?a:this.providers.get(a)},removeProvider:function(d){var b=this,a=b.providers,c=b.relayers,e;d=d.isProvider?d:a.get(d);if(d){d.un("data",b.onProviderData,b);e=d.id;if(c[e]){c[e].destroy();delete c[e]}a.remove(d);return d}return null},addTransaction:function(a){this.transactions.add(a);return a},removeTransaction:function(b){var a=this;b=a.getTransaction(b);a.transactions.remove(b);return b},getTransaction:function(a){return typeof a==="object"?a:this.transactions.get(a)},onProviderData:function(e,d){var c=this,b,a;if(Ext.isArray(d)){for(b=0,a=d.length;b<a;++b){c.onProviderData(e,d[b])}return}if(d.name&&d.name!="event"&&d.name!="exception"){c.fireEvent(d.name,d)}else{if(d.status===false){c.fireEvent("exception",d)}}c.fireEvent("event",d,e)},parseMethod:function(c){if(Ext.isString(c)){var e=c.split("."),b=0,a=e.length,d=Ext.global;while(d&&b<a){d=d[e[b]];++b}c=Ext.isFunction(d)?d:null}return c||null}},function(){Ext.Direct=Ext.direct.Manager});Ext.define("Ext.data.proxy.Direct",{extend:Ext.data.proxy.Server,alternateClassName:"Ext.data.DirectProxy",alias:"proxy.direct",paramOrder:undefined,paramsAsHash:true,directFn:undefined,paramOrderRe:/[\s,|]/,constructor:function(b){var c=this,a;c.callParent(arguments);a=c.paramOrder;if(Ext.isString(a)){c.paramOrder=a.split(c.paramOrderRe)}},resolveMethods:function(){var d=this,c=d.directFn,b=d.api,a=Ext.direct.Manager,e;if(c){e=d.directFn=a.parseMethod(c);if(!Ext.isFunction(e)){Ext.Error.raise("Cannot resolve directFn "+c)}}else{if(b){for(c in b){if(b.hasOwnProperty(c)){e=b[c];b[c]=a.parseMethod(e);if(!Ext.isFunction(b[c])){Ext.Error.raise("Cannot resolve Direct api "+c+" method "+e)}}}}}d.methodsResolved=true},doRequest:function(d,j,k){var h=this,b=h.getWriter(),e=h.buildRequest(d),c=e.params,g=[],i,a;if(!h.methodsResolved){h.resolveMethods()}i=h.api[e.action]||h.directFn;if(d.allowWrite()){e=b.write(e)}if(d.action=="read"){a=i.directCfg.method;g=a.getArgs(c,h.paramOrder,h.paramsAsHash)}else{g.push(e.jsonData)}Ext.apply(e,{args:g,directFn:i});g.push(h.createRequestCallback(e,d,j,k),h);i.apply(window,g)},applyEncoding:Ext.identityFn,createRequestCallback:function(d,a,e,b){var c=this;return function(h,g){c.processResponse(g.status,a,d,g,e,b)}},extractResponseData:function(a){return Ext.isDefined(a.result)?a.result:a.data},setException:function(b,a){b.setException(a.message)},buildUrl:function(){return""}});Ext.define("Ext.data.DirectStore",{extend:Ext.data.Store,alias:"store.direct",constructor:function(a){a=Ext.apply({},a);if(!a.proxy){var b={type:"direct",reader:{type:"json"}};Ext.copyTo(b,a,"paramOrder,paramsAsHash,directFn,api,simpleSortMode");Ext.copyTo(b.reader,a,"totalProperty,root,idProperty");a.proxy=b}this.callParent([a])}});Ext.define("Ext.data.JsonP",{singleton:true,requestCount:0,requests:{},timeout:30000,disableCaching:true,disableCachingParam:"_dc",callbackKey:"callback",request:function(n){n=Ext.apply({},n);var j=this,d=Ext.isDefined(n.disableCaching)?n.disableCaching:j.disableCaching,h=n.disableCachingParam||j.disableCachingParam,c=++j.requestCount,l=n.callbackName||"callback"+c,i=n.callbackKey||j.callbackKey,m=Ext.isDefined(n.timeout)?n.timeout:j.timeout,e=n.params||{},b=n.url,a=Ext.name,g,k;if(d&&!e[h]){e[h]=new Date().getTime()}else{e=n.params}e[i]=a+".data.JsonP."+l;k=j.createScript(b,e,n);j.requests[c]=g={url:b,params:e,script:k,id:c,scope:n.scope,success:n.success,failure:n.failure,callback:n.callback,callbackKey:i,callbackName:l};if(m>0){g.timeout=setTimeout(Ext.bind(j.handleTimeout,j,[g]),m)}j.setupErrorHandling(g);j[l]=Ext.bind(j.handleResponse,j,[g],true);j.loadScript(g);return g},abort:function(c){var b=this,d=b.requests,a;if(c){if(!c.id){c=d[c]}b.handleAbort(c)}else{for(a in d){if(d.hasOwnProperty(a)){b.abort(d[a])}}}},setupErrorHandling:function(a){a.script.onerror=Ext.bind(this.handleError,this,[a])},handleAbort:function(a){a.errorType="abort";this.handleResponse(null,a)},handleError:function(a){a.errorType="error";this.handleResponse(null,a)},cleanupErrorHandling:function(a){a.script.onerror=null},handleTimeout:function(a){a.errorType="timeout";this.handleResponse(null,a)},handleResponse:function(a,b){var c=true;if(b.timeout){clearTimeout(b.timeout)}delete this[b.callbackName];delete this.requests[b.id];this.cleanupErrorHandling(b);Ext.fly(b.script).remove();if(b.errorType){c=false;Ext.callback(b.failure,b.scope,[b.errorType])}else{Ext.callback(b.success,b.scope,[a])}Ext.callback(b.callback,b.scope,[c,a,b.errorType]);Ext.EventManager.idleEvent.fire()},createScript:function(c,d,b){var a=document.createElement("script");a.setAttribute("src",Ext.urlAppend(c,Ext.Object.toQueryString(d)));a.setAttribute("async",true);a.setAttribute("type","text/javascript");return a},loadScript:function(a){Ext.getHead().appendChild(a.script)}});Ext.define("Ext.data.proxy.JsonP",{extend:Ext.data.proxy.Server,alternateClassName:"Ext.data.ScriptTagProxy",alias:["proxy.jsonp","proxy.scripttag"],defaultWriterType:"base",callbackKey:"callback",recordParam:"records",autoAppendParams:true,constructor:function(){this.addEvents("exception");this.callParent(arguments)},doRequest:function(a,g,b){var d=this,c=d.buildRequest(a),e=c.params;Ext.apply(c,{callbackKey:d.callbackKey,timeout:d.timeout,scope:d,disableCaching:false,callback:d.createRequestCallback(c,a,g,b)});if(d.autoAppendParams){c.params={}}c.jsonp=Ext.data.JsonP.request(c);c.params=e;a.setStarted();d.lastRequest=c;return c},createRequestCallback:function(d,a,e,b){var c=this;return function(i,g,h){delete c.lastRequest;c.processResponse(i,a,d,g,e,b)}},setException:function(b,a){b.setException(b.request.jsonp.errorType)},buildUrl:function(h){var k=this,a=k.callParent(arguments),d=h.records,e=k.getWriter(),g,c,b,j;if(e&&h.operation.allowWrite()){h=e.write(h)}g=h.params;c=g.filters,delete g.filters;if(c&&c.length){for(j=0;j<c.length;j++){b=c[j];if(b.value){g[b.property]=b.value}}}if((!e||!e.encode)&&Ext.isArray(d)&&d.length>0){g[k.recordParam]=k.encodeRecords(d)}if(k.autoAppendParams){a=Ext.urlAppend(a,Ext.Object.toQueryString(g))}return a},abort:function(){var a=this.lastRequest;if(a){Ext.data.JsonP.abort(a.jsonp)}},encodeRecords:function(b){var d=[],c=0,a=b.length;for(;c<a;c++){d.push(Ext.encode(b[c].getData()))}return d}});Ext.define("Ext.data.JsonPStore",{extend:Ext.data.Store,alias:"store.jsonp",constructor:function(a){a=Ext.apply({proxy:{type:"jsonp",reader:"json"}},a);this.callParent([a])}});Ext.define("Ext.data.JsonStore",{extend:Ext.data.Store,alias:"store.json",constructor:function(a){a=Ext.apply({proxy:{type:"ajax",reader:"json",writer:"json"}},a);this.callParent([a])}});Ext.define("Ext.data.NodeInterface",{statics:{decorate:function(b){var a,c,d;if(typeof b=="string"){b=Ext.ModelManager.getModel(b)}else{if(b.isModel){b=Ext.ModelManager.getModel(b.modelName)}}if(b.prototype.isNode){return}a=b.prototype.idProperty;c=b.prototype.fields.get(a);d=b.prototype.fields.get(a).type.type;b.override(this.getPrototypeBody());this.applyFields(b,[{name:"parentId",type:d,defaultValue:null,useNull:c.useNull},{name:"index",type:"int",defaultValue:0,persist:false,convert:null},{name:"depth",type:"int",defaultValue:0,persist:false,convert:null},{name:"expanded",type:"bool",defaultValue:false,persist:false,convert:null},{name:"expandable",type:"bool",defaultValue:true,persist:false,convert:null},{name:"checked",type:"auto",defaultValue:null,persist:false,convert:null},{name:"leaf",type:"bool",defaultValue:false},{name:"cls",type:"string",defaultValue:"",persist:false,convert:null},{name:"iconCls",type:"string",defaultValue:"",persist:false,convert:null},{name:"icon",type:"string",defaultValue:"",persist:false,convert:null},{name:"root",type:"boolean",defaultValue:false,persist:false,convert:null},{name:"isLast",type:"boolean",defaultValue:false,persist:false,convert:null},{name:"isFirst",type:"boolean",defaultValue:false,persist:false,convert:null},{name:"allowDrop",type:"boolean",defaultValue:true,persist:false,convert:null},{name:"allowDrag",type:"boolean",defaultValue:true,persist:false,convert:null},{name:"loaded",type:"boolean",defaultValue:false,persist:false,convert:null},{name:"loading",type:"boolean",defaultValue:false,persist:false,convert:null},{name:"href",type:"string",defaultValue:"",persist:false,convert:null},{name:"hrefTarget",type:"string",defaultValue:"",persist:false,convert:null},{name:"qtip",type:"string",defaultValue:"",persist:false,convert:null},{name:"qtitle",type:"string",defaultValue:"",persist:false,convert:null},{name:"qshowDelay",type:"int",defaultValue:0,persist:false,convert:null},{name:"children",type:"auto",defaultValue:null,persist:false,convert:null}])},applyFields:function(c,b){var h=c.prototype,a=h.fields,g=a.keys,e=b.length,j,d;for(d=0;d<e;d++){j=b[d];if(!Ext.Array.contains(g,j.name)){a.add(new Ext.data.Field(j))}}},getPrototypeBody:function(){var a={idchanged:true,append:true,remove:true,move:true,insert:true,beforeappend:true,beforeremove:true,beforemove:true,beforeinsert:true,expand:true,collapse:true,beforeexpand:true,beforecollapse:true,sort:true,rootchange:true};return{isNode:true,constructor:function(){var b=this;b.callParent(arguments);b.firstChild=b.lastChild=b.parentNode=b.previousSibling=b.nextSibling=null;b.childNodes=[];return b},createNode:function(b){if(!b.isModel){b=Ext.ModelManager.create(b,this.modelName)}if(!b.childNodes){b.firstChild=b.lastChild=b.parentNode=b.previousSibling=b.nextSibling=null;b.childNodes=[]}return b},isLeaf:function(){return this.get("leaf")===true},setFirstChild:function(b){this.firstChild=b},setLastChild:function(b){this.lastChild=b},updateInfo:function(j,d){var n=this,m=n.data.depth,p={},c=n.childNodes,h=c.length,k,g=n.phantom,e=n[n.persistenceProperty],l,b,o;if(!d){Ext.Error.raise("NodeInterface expects update info to be passed")}for(l in d){o=n.fields.get(l);b=d[l];if(o&&o.persist){n.dirty=n.dirty||!n.isEqual(e[l],b)}e[l]=b}if(j){n.commit();n.phantom=g}if(n.data.depth!==m){p={depth:n.data.depth+1};for(k=0;k<h;k++){c[k].updateInfo(j,p)}}},isLast:function(){return this.get("isLast")},isFirst:function(){return this.get("isFirst")},hasChildNodes:function(){return !this.isLeaf()&&this.childNodes.length>0},isExpandable:function(){var b=this;if(b.get("expandable")){return !(b.isLeaf()||(b.isLoaded()&&!b.hasChildNodes()))}return false},triggerUIUpdate:function(){this.afterEdit([])},appendChild:function(c,l,d){var j=this,e,h,g,k,b,m={isLast:true,parentId:j.getId(),depth:(j.data.depth||0)+1};if(Ext.isArray(c)){j.callStore("suspendAutoSync");for(e=0,h=c.length-1;e<h;e++){j.appendChild(c[e],l,d)}j.callStore("resumeAutoSync");j.appendChild(c[h],l,d)}else{c=j.createNode(c);if(l!==true&&j.fireEventArgs("beforeappend",[j,c])===false){return false}g=j.childNodes.length;k=c.parentNode;if(k){if(l!==true&&c.fireEventArgs("beforemove",[c,k,j,g])===false){return false}k.removeChild(c,false,false,true)}Ext.suspendLayouts();g=j.childNodes.length;if(g===0){j.setFirstChild(c)}j.childNodes[g]=c;c.parentNode=j;c.nextSibling=null;j.setLastChild(c);b=j.childNodes[g-1];if(b){c.previousSibling=b;b.nextSibling=c;b.updateInfo(d,{isLast:false});b.triggerUIUpdate()}else{c.previousSibling=null}m.isFirst=g===0;m.index=g;c.updateInfo(d,m);if(!j.isLoaded()){j.set("loaded",true)}else{if(j.childNodes.length===1){j.triggerUIUpdate()}}if(g&&j.childNodes[g-1].isExpanded()){j.childNodes[g-1].cascadeBy(j.triggerUIUpdate)}if(!c.isLeaf()&&c.phantom){c.set("loaded",true)}Ext.resumeLayouts(true);if(l!==true){j.fireEventArgs("append",[j,c,g]);if(k){c.fireEventArgs("move",[c,k,j,g])}}return c}},getOwnerTree:function(){var c=this,b;while(c.parentNode){c=c.parentNode}b=c.store;if(b){if(b.treeStore){b=b.treeStore}if(b.tree){return b.ownerTree}}return undefined},removeChild:function(c,j,l,k){var h=this,g=h.indexOf(c),e,d,b;if(g===-1||(l!==true&&h.fireEventArgs("beforeremove",[h,c,!!k])===false)){return false}Ext.suspendLayouts();Ext.Array.erase(h.childNodes,g,1);if(h.firstChild===c){h.setFirstChild(c.nextSibling)}if(h.lastChild===c){h.setLastChild(c.previousSibling)}if(b=c.previousSibling){c.previousSibling.nextSibling=c.nextSibling}if(c.nextSibling){c.nextSibling.previousSibling=c.previousSibling;if(g===0){c.nextSibling.updateInfo(false,{isFirst:true})}for(e=g,d=h.childNodes.length;e<d;e++){h.childNodes[e].updateInfo(false,{index:e})}}else{if(b){b.updateInfo(false,{isLast:true});if(b.isExpanded()){b.cascadeBy(h.triggerUIUpdate)}else{b.triggerUIUpdate()}}}if(!h.childNodes.length){h.triggerUIUpdate()}Ext.resumeLayouts(true);if(l!==true){c.removeContext={parentNode:c.parentNode,previousSibling:c.previousSibling,nextSibling:c.nextSibling};c.previousSibling=c.nextSibling=c.parentNode=null;h.fireEventArgs("remove",[h,c,!!k]);c.removeContext=null}if(j){c.destroy(true)}else{c.clear()}return c},copy:function(e,d){var h=this,c=h.callParent(arguments),b=h.childNodes?h.childNodes.length:0,g;if(d){for(g=0;g<b;g++){c.appendChild(h.childNodes[g].copy(undefined,true))}}return c},clear:function(b){var c=this;c.parentNode=c.previousSibling=c.nextSibling=null;if(b){c.firstChild=c.lastChild=null}},destroy:function(c){var e=this,d=e.destroyOptions,b=e.childNodes,g=b.length,h;if(c===true){e.clear(true);for(h=0;h<g;h++){b[h].destroy(true)}e.childNodes=null;delete e.destroyOptions;e.callParent([d])}else{e.destroyOptions=c;e.remove(true)}},insertBefore:function(c,h,m){var j=this,g=j.indexOf(h),k=c.parentNode,l=g,d,b,e;if(!h){return j.appendChild(c)}if(c===h){return false}c=j.createNode(c);if(m!==true&&j.fireEventArgs("beforeinsert",[j,c,h])===false){return false}if(k===j&&j.indexOf(c)<g){l--}if(k){if(m!==true&&c.fireEventArgs("beforemove",[c,k,j,g,h])===false){return false}k.removeChild(c,false,false,true)}if(l===0){j.setFirstChild(c)}Ext.Array.splice(j.childNodes,l,0,c);c.parentNode=j;c.nextSibling=h;h.previousSibling=c;b=j.childNodes[l-1];if(b){c.previousSibling=b;b.nextSibling=c}else{c.previousSibling=null}c.updateInfo(false,{parentId:j.getId(),index:l,isFirst:l===0,isLast:false,depth:(j.data.depth||0)+1});for(e=l+1,d=j.childNodes.length;e<d;e++){j.childNodes[e].updateInfo(false,{index:e})}if(!j.isLoaded()){j.set("loaded",true)}else{if(j.childNodes.length===1){j.triggerUIUpdate()}}if(!c.isLeaf()&&c.phantom){c.set("loaded",true)}if(m!==true){j.fireEventArgs("insert",[j,c,h]);if(k){c.fireEventArgs("move",[c,k,j,l,h])}}return c},insertChild:function(b,d){var c=this.childNodes[b];if(c){return this.insertBefore(d,c)}else{return this.appendChild(d)}},remove:function(c,d){var e=this,b=e.parentNode;if(b){b.removeChild(e,c,d)}else{if(c){e.destroy(true)}}return e},removeAll:function(j,l,d){var h=this,k=this.childNodes,e=0,g=k.length,b,c;if(!g){return}d=d===true;if(!d){b=h.store&&h.store.treeStore;if(b){b.beginBulkRemove()}}for(;e<g;++e){c=k[e];c.removeContext={parentNode:c.parentNode,previousSibling:c.previousSibling,nextSibling:c.nextSibling};c.previousSibling=c.nextSibling=c.parentNode=null;h.fireEventArgs("remove",[h,c,false]);c.removeContext=null;if(j){c.destroy(true)}else{c.removeAll(false,l,true)}}h.firstChild=h.lastChild=null;if(d){h.childNodes=null}else{h.childNodes.length=0}if(!d){h.triggerUIUpdate();if(b){b.endBulkRemove()}}return h},getChildAt:function(b){return this.childNodes[b]},replaceChild:function(b,e,d){var c=e?e.nextSibling:null;this.removeChild(e,false,d);this.insertBefore(b,c,d);return e},indexOf:function(b){return Ext.Array.indexOf(this.childNodes,b)},indexOfId:function(e){var d=this.childNodes,b=d.length,c=0;for(;c<b;++c){if(d[c].getId()===e){return c}}return -1},getPath:function(e,d){e=e||this.idProperty;d=d||"/";var c=[this.get(e)],b=this.parentNode;while(b){c.unshift(b.get(e));b=b.parentNode}return d+c.join(d)},getDepth:function(){return this.get("depth")},bubble:function(d,c,b){var e=this;while(e){if(d.apply(c||e,b||[e])===false){break}e=e.parentNode}},cascade:function(){if(Ext.isDefined(Ext.global.console)){Ext.global.console.warn("Ext.data.Node: cascade has been deprecated. Please use cascadeBy instead.")}return this.cascadeBy.apply(this,arguments)},cascadeBy:function(e,d,b){if(e.apply(d||this,b||[this])!==false){var h=this.childNodes,g=h.length,c;for(c=0;c<g;c++){h[c].cascadeBy(e,d,b)}}},eachChild:function(e,d,b){var h=this.childNodes,g=h.length,c;for(c=0;c<g;c++){if(e.apply(d||this,b||[h[c]])===false){break}}},findChild:function(c,d,b){return this.findChildBy(function(){return this.get(c)==d},null,b)},findChildBy:function(j,h,c){var g=this.childNodes,b=g.length,e=0,k,d;for(;e<b;e++){k=g[e];if(j.call(h||k,k)===true){return k}else{if(c){d=k.findChildBy(j,h,c);if(d!==null){return d}}}}return null},contains:function(b){return b.isAncestor(this)},isAncestor:function(b){var c=this.parentNode;while(c){if(c===b){return true}c=c.parentNode}return false},sort:function(h,c,b){var e=this.childNodes,g=e.length,d,k,j={isFirst:true};if(g>0){Ext.Array.sort(e,h);this.setFirstChild(e[0]);this.setLastChild(e[g-1]);for(d=0;d<g;d++){k=e[d];k.previousSibling=e[d-1];k.nextSibling=e[d+1];j.isLast=(d===g-1);j.index=d;k.updateInfo(false,j);j.isFirst=false;if(c&&!k.isLeaf()){k.sort(h,true,true)}}if(b!==true){this.fireEventArgs("sort",[this,e])}}},isExpanded:function(){return this.get("expanded")},isLoaded:function(){return this.get("loaded")},isLoading:function(){return this.get("loading")},isRoot:function(){return !this.parentNode},isVisible:function(){var b=this.parentNode;while(b){if(!b.isExpanded()){return false}b=b.parentNode}return true},expand:function(b,e,c){var d=this;if(!d.isLeaf()){if(d.isLoading()){d.on("expand",function(){d.expand(b,e,c)},d,{single:true})}else{if(!d.isExpanded()){d.fireEventArgs("beforeexpand",[d,d.onChildNodesAvailable,d,[b,e,c]])}else{if(b){d.expandChildren(true,d.getOwnerTree().singleExpand,e,c)}else{Ext.callback(e,c||d,[d.childNodes])}}}}else{Ext.callback(e,c||d)}},onChildNodesAvailable:function(b,c,g,d){var e=this;Ext.suspendLayouts();e.set("expanded",true);e.fireEventArgs("expand",[e,e.childNodes,false]);if(c){e.expandChildren(true,e.getOwnerTree().singleExpand,g,d)}else{Ext.callback(g,d||e,[e.childNodes])}Ext.resumeLayouts(true)},expandChildren:function(g,h,m,n){var l=this,j,c=l.childNodes,b=[],k=h?Math.min(c.length,1):c.length,e,d=0;for(j=0;j<k;++j){e=c[j];if(!e.isLeaf()){b.push(e)}}k=b.length;for(j=0;j<k;++j){e=b[j];if(j===k-1){e.expand(g,m,n)}else{e.expand(g)}}if(!d&&m){Ext.callback(m,n||l,[l.childNodes])}},collapse:function(d,k,g){var h=this,c=h.isExpanded(),b=h.childNodes.length,e,j;if(!h.isLeaf()&&((!c&&d)||h.fireEventArgs("beforecollapse",[h])!==false)){Ext.suspendLayouts();if(h.isExpanded()){if(d){j=function(){for(e=0;e<b;e++){h.childNodes[e].setCollapsed(true)}};if(k){k=Ext.Function.createSequence(j,k)}else{k=j}}h.set("expanded",false);h.fireEventArgs("collapse",[h,h.childNodes,false,k?Ext.Function.bind(k,g,[h.childNodes]):null,null]);k=null}else{if(d){for(e=0;e<b;e++){h.childNodes[e].setCollapsed(true)}}}Ext.resumeLayouts(true)}Ext.callback(k,g||h,[h.childNodes])},setCollapsed:function(c){var e=this,b=e.childNodes.length,d;if(!e.isLeaf()&&e.fireEventArgs("beforecollapse",[e,Ext.emptyFn])!==false){e.data.expanded=false;e.fireEventArgs("collapse",[e,e.childNodes,false,null,null]);if(c){for(d=0;d<b;d++){e.childNodes[d].setCollapsed(true)}}}},collapseChildren:function(d,k,l){var j=this,g,b=j.childNodes,h=b.length,e=[],c;for(g=0;g<h;++g){c=b[g];if(!c.isLeaf()&&c.isLoaded()&&c.isExpanded()){e.push(c)}}h=e.length;for(g=0;g<h;++g){c=e[g];if(g===h-1){c.collapse(d,k,l)}else{c.collapse(d)}}},fireEventArgs:function(d,e){var h=Ext.data.Model.prototype.fireEventArgs,b,g,c;if(a[d]){for(g=this;b!==false&&g;g=(c=g).parentNode){if(g.hasListeners[d]){b=h.call(g,d,e)}}g=c.rootOf;if(b!==false&&g){if(g.hasListeners[d]){b=g.fireEventArgs.call(g,d,e)}g=g.treeStore;if(b!==false&&g){if(g.hasListeners[d]){b=g.fireEventArgs.call(g,d,e)}}}return b}else{return h.apply(this,arguments)}},serialize:function(){var c=Ext.data.writer.Json.prototype.getRecordData(this),g=this.childNodes,b=g.length,e,d;if(b>0){for(d=0;d<b;d++){e.push(g[d].serialize())}}return c}}}}});Ext.define("Ext.data.NodeStore",{extend:Ext.data.Store,alias:"store.node",isNodeStore:true,node:null,recursive:false,rootVisible:false,isExpandingOrCollapsing:0,constructor:function(a){var c=this,b;a=a||{};Ext.apply(c,a);a.proxy={type:"proxy"};c.callParent([a]);b=c.node;if(b){c.node=null;c.setNode(b)}},getTotalCount:function(){return this.getCount()},setNode:function(b){var a=this;if(a.node&&a.node!=b){a.mun(a.node,{expand:a.onNodeExpand,collapse:a.onNodeCollapse,append:a.onNodeAppend,insert:a.onNodeInsert,remove:a.onNodeRemove,sort:a.onNodeSort,scope:a});a.node=null}if(b){Ext.data.NodeInterface.decorate(b.self);a.removeAll();if(a.rootVisible){a.add(b)}else{if(!b.isExpanded()&&a.treeStore.autoLoad!==false){b.expand()}}a.mon(b,{expand:a.onNodeExpand,collapse:a.onNodeCollapse,append:a.onNodeAppend,insert:a.onNodeInsert,remove:a.onNodeRemove,sort:a.onNodeSort,scope:a});a.node=b;if(b.isExpanded()&&b.isLoaded()){a.onNodeExpand(b,b.childNodes,true)}}},onNodeSort:function(b,c){var a=this;if((a.indexOf(b)!==-1||(b===a.node&&!a.rootVisible)&&b.isExpanded())){Ext.suspendLayouts();a.onNodeCollapse(b,c,true);a.onNodeExpand(b,c,true);Ext.resumeLayouts(true)}},onNodeExpand:function(e,c,b){var g=this,a=g.indexOf(e)+1,d=[];if(!b){g.fireEvent("beforeexpand",e,c,a)}g.handleNodeExpand(e,c,d);g.insert(a,d);if(!b){g.fireEvent("expand",e,c)}},handleNodeExpand:function(e,b,d){var h=this,g=b?b.length:0,c,a;if(!h.recursive&&e!==h.node){return}if(e!==this.node&&!h.isVisible(e)){return}if(g){for(c=0;c<g;c++){a=b[c];d.push(a);if(a.isExpanded()){if(a.isLoaded()){h.handleNodeExpand(a,a.childNodes,d)}else{a.set("expanded",false);a.expand()}}}}},onNodeCollapse:function(e,c,j,i,k){var d=this,h=d.indexOf(e)+1,b,a,g,l;if(!d.recursive&&e!==d.node){return}if(!j){d.fireEvent("beforecollapse",e,c,h,i,k)}if(c.length&&d.data.contains(c[0])){b=e;while(b.parentNode){g=b.nextSibling;if(g){l=true;a=d.indexOf(g);break}else{b=b.parentNode}}if(!l){a=d.getCount()}d.removeAt(h,a-h)}if(!j){d.fireEvent("collapse",e,c,h)}},onNodeAppend:function(d,g,b){var e=this,a,c;if(e.isVisible(g)){if(b===0){a=d}else{c=g.previousSibling;while(c.isExpanded()&&c.lastChild){c=c.lastChild}a=c}e.insert(e.indexOf(a)+1,g);if(!g.isLeaf()&&g.isExpanded()){if(g.isLoaded()){e.onNodeExpand(g,g.childNodes,true)}else{if(!e.treeStore.fillCount){g.set("expanded",false);g.expand()}}}}},onNodeInsert:function(c,e,a){var d=this,b=this.indexOf(a);if(b!=-1&&d.isVisible(e)){d.insert(b,e);if(!e.isLeaf()&&e.isExpanded()){if(e.isLoaded()){d.onNodeExpand(e,e.childNodes,true)}else{e.set("expanded",false);e.expand()}}}},onNodeRemove:function(b,d,a){var c=this;if(c.indexOf(d)!=-1){if(!d.isLeaf()&&d.isExpanded()){d.parentNode=d.removeContext.parentNode;d.nextSibling=d.removeContext.nextSibling;c.onNodeCollapse(d,d.childNodes,true);d.parentNode=d.nextSibling=null}c.remove(d)}},isVisible:function(b){var a=b.parentNode;while(a){if(a===this.node&&a.data.expanded){return true}if(!a.data.expanded){return false}a=a.parentNode}return false}});Ext.define("Ext.data.Request",{action:undefined,params:undefined,method:"GET",url:undefined,constructor:function(a){Ext.apply(this,a)}});Ext.define("Ext.data.SequentialIdGenerator",{extend:Ext.data.IdGenerator,alias:"idgen.sequential",constructor:function(){var a=this;a.callParent(arguments);a.parts=[a.prefix,""]},prefix:"",seed:1,generate:function(){var a=this,b=a.parts;b[1]=a.seed++;return b.join("")}});Ext.define("Ext.data.Tree",{alias:"data.tree",mixins:{observable:Ext.util.Observable},root:null,constructor:function(a){var b=this;b.mixins.observable.constructor.call(b);if(a){b.setRootNode(a)}b.on({scope:b,idchanged:b.onNodeIdChanged,insert:b.onNodeInsert,append:b.onNodeAppend,remove:b.onNodeRemove})},getRootNode:function(){return this.root},setRootNode:function(b){var a=this;a.root=b;if(b.rootOf){b.rootOf.removeRootNode()}else{if(b.parentNode){b.parentNode.removeChild(b)}}b.rootOf=a;if(b.fireEventArgs("beforeappend",[null,b])!==false){b.set("root",true);b.updateInfo(true,{isFirst:true,isLast:true,depth:0,index:0,parentId:null});a.nodeHash={};b.fireEvent("append",null,b);b.fireEvent("rootchange",b)}return b},removeRootNode:function(){var b=this,a=b.root;a.set("root",false);a.fireEvent("remove",null,a,false);a.fireEvent("rootchange",null);a.rootOf=b.root=null;return a},flatten:function(){return Ext.Object.getValues(this.nodeHash)},onNodeInsert:function(a,b){this.registerNode(b,true)},onNodeAppend:function(a,b){this.registerNode(b,true)},onNodeRemove:function(a,b){this.unregisterNode(b,true)},onNodeIdChanged:function(d,e,b,a){var c=this.nodeHash;c[d.internalId]=d;delete c[a]},getNodeById:function(a){return this.nodeHash[a]},registerNode:function(g,a){var e=this,c,d,b;e.nodeHash[g.internalId]=g;if(a===true){c=g.childNodes;d=c.length;for(b=0;b<d;b++){e.registerNode(c[b],true)}}},unregisterNode:function(g,a){var e=this,c,d,b;delete e.nodeHash[g.internalId];if(a===true){c=g.childNodes;d=c.length;for(b=0;b<d;b++){e.unregisterNode(c[b],true)}}},sort:function(b,a){this.getRootNode().sort(b,a)},filter:function(b,a){this.getRootNode().filter(b,a)}});Ext.define("Ext.data.TreeModel",{extend:Ext.data.Model},function(){Ext.data.NodeInterface.decorate(this)});Ext.define("Ext.data.TreeStore",{extend:Ext.data.AbstractStore,alias:"store.tree",clearOnLoad:true,clearRemovedOnLoad:true,nodeParam:"node",defaultRootId:"root",defaultRootText:"Root",defaultRootProperty:"children",rootProperty:"children",fillCount:0,folderSort:false,constructor:function(c){var e=this,b,a,d;c=Ext.apply({},c);a=c.fields||e.fields;if(!a){c.fields=[{name:"text",type:"string"}];d=c.defaultRootProperty||e.defaultRootProperty;if(d!==e.defaultRootProperty){c.fields.push({name:d,type:"auto",defaultValue:null,persist:false})}}e.callParent([c]);e.tree=new Ext.data.Tree();e.tree.treeStore=e;e.tree.on({scope:e,remove:e.onNodeRemove,beforeexpand:e.onBeforeNodeExpand,append:e.onNodeAdded,insert:e.onNodeAdded,sort:e.onNodeSort});e.onBeforeSort();b=e.root;if(b){delete e.root;e.setRootNode(b)}if(Ext.isDefined(e.nodeParameter)){if(Ext.isDefined(Ext.global.console)){Ext.global.console.warn("Ext.data.TreeStore: nodeParameter has been deprecated. Please use nodeParam instead.")}e.nodeParam=e.nodeParameter;delete e.nodeParameter}},setProxy:function(c){var a,b;if(c instanceof Ext.data.proxy.Proxy){b=Ext.isEmpty(c.getReader().root)}else{if(Ext.isString(c)){b=true}else{a=c.reader;b=!(a&&!Ext.isEmpty(a.root))}}c=this.callParent(arguments);c.idParam=this.nodeParam;if(b){a=c.getReader();a.root=this.defaultRootProperty;a.buildExtractors(true)}},onBeforeSort:function(){if(this.folderSort){this.sort({property:"leaf",direction:"ASC"},"prepend",false)}},onBeforeNodeExpand:function(a,i,j,e){var g=this,d,h,c,b;if(a.isLoaded()){b=[a.childNodes];if(e){b.push.apply(b,e)}Ext.callback(i,j||a,b)}else{if(h=(c=(a.raw||a[a.persistenceProperty])[(d=g.getProxy().getReader()).root])){g.fillNode(a,d.extractData(h));delete c[d.root];b=[a.childNodes];if(e){b.push.apply(b,e)}Ext.callback(i,j||a,b)}else{if(a.isLoading()){g.on("load",function(){b=[a.childNodes];if(e){b.push.apply(b,e)}Ext.callback(i,j||a,b)},g,{single:true})}else{g.read({node:a,callback:function(){delete g.lastOptions.callback;b=[a.childNodes];if(e){b.push.apply(b,e)}Ext.callback(i,j||a,b)}})}}}},getNewRecords:function(){return Ext.Array.filter(this.tree.flatten(),this.filterNew)},getUpdatedRecords:function(){return Ext.Array.filter(this.tree.flatten(),this.filterUpdated)},onNodeRemove:function(b,d,a){var c=this;d.unjoin(c);if(!d.phantom&&!a){Ext.Array.include(c.removed,d)}if(c.autoSync&&!c.autoSyncSuspended&&!a){c.sync()}},onNodeAdded:function(c,e){var d=this,b=d.getProxy(),a=b.getReader(),g=e.raw||e[e.persistenceProperty],h;Ext.Array.remove(d.removed,e);e.join(d);if(!e.isLeaf()&&!d.lazyFill){h=a.getRoot(g);if(h){d.fillNode(e,a.extractData(h));delete g[a.root]}}if(d.autoSync&&!d.autoSyncSuspended&&(e.phantom||e.dirty)){d.sync()}},onNodeSort:function(){if(this.autoSync&&!this.autoSyncSuspended){this.sync()}},setRootNode:function(a,e){var d=this,c=d.model,b=c.prototype.idProperty;a=a||{};if(!a.isModel){a=Ext.apply({},a);Ext.applyIf(a,{id:d.defaultRootId,text:d.defaultRootText,allowDrag:false});if(a[b]===undefined){a[b]=d.defaultRootId}Ext.data.NodeInterface.decorate(c);a=Ext.ModelManager.create(a,c)}else{if(a.isModel&&!a.isNode){Ext.data.NodeInterface.decorate(c)}}d.getProxy().getReader().buildExtractors(true);d.tree.setRootNode(a);if(e!==true&&!a.isLoaded()&&(d.autoLoad===true||a.isExpanded())){a.data.expanded=false;a.expand()}return a},getRootNode:function(){return this.tree.getRootNode()},getNodeById:function(a){return this.tree.getNodeById(a)},getById:function(a){return this.getNodeById(a)},load:function(a){a=a||{};a.params=a.params||{};var c=this,b=a.node||c.tree.getRootNode();if(!b){b=c.setRootNode({expanded:true},true)}a.id=b.getId();if(c.clearOnLoad){if(c.clearRemovedOnLoad){c.clearRemoved(b)}c.tree.un("remove",c.onNodeRemove,c);b.removeAll(false);c.tree.on("remove",c.onNodeRemove,c)}Ext.applyIf(a,{node:b});c.callParent([a]);if(c.loading&&b){b.set("loading",true)}return c},clearRemoved:function(b){var k=this,e=k.removed,a=b.getId(),d=e.length,c=d,n={},h=[],m={},j,g,l;if(b===k.getRootNode()){k.removed=[];return}for(;c--;){j=e[c];m[j.getId()]=j}for(c=d;c--;){j=e[c];g=j;while(g&&g.getId()!==a){l=g.get("parentId");g=g.parentNode||k.getNodeById(l)||m[l]}if(g){n[j.getId()]=j}}for(c=0;c<d;c++){j=e[c];if(!n[j.getId()]){h.push(j)}}k.removed=h},fillNode:function(b,c){var h=this,e=c?c.length:0,g=h.sorters,d,k,j=false,a=e&&h.sortOnLoad&&!h.remoteSort&&g&&g.items&&g.items.length,n,m,l;for(d=1;d<e;d++){n=c[d];m=c[d-1];j=n[n.persistenceProperty].index!=m[m.persistenceProperty].index;if(j){break}}if(a){if(j){h.sorters.insert(0,h.indexSorter)}k=new Ext.util.MixedCollection();k.addAll(c);k.sort(h.sorters.items);c=k.items;h.sorters.remove(h.indexSorter)}else{if(j){Ext.Array.sort(c,h.sortByIndex)}}b.set("loaded",true);l=h.fillCount===0;if(l){h.fireEvent("beforefill",h,b,c)}++h.fillCount;if(c.length){b.appendChild(c,undefined,true)}if(l){h.fireEvent("fillcomplete",h,b,c)}--h.fillCount;return c},beginBulkRemove:function(){this.fireEvent("beforebulkremove",this)},endBulkRemove:function(){this.fireEvent("bulkremovecomplete",this)},sortByIndex:function(b,a){return b[b.persistenceProperty].index-a[a.persistenceProperty].index},onIdChanged:function(c,d,b,a){this.tree.onNodeIdChanged(c,d,b,a);this.callParent(arguments)},onProxyLoad:function(b){var d=this,e=b.wasSuccessful(),a=b.getRecords(),c=b.node;d.loading=false;c.set("loading",false);if(e){if(!d.clearOnLoad){a=d.cleanRecords(c,a)}a=d.fillNode(c,a)}d.fireEvent("read",d,b.node,a,e);d.fireEvent("load",d,b.node,a,e);Ext.callback(b.callback,b.scope||d,[a,b,e])},cleanRecords:function(g,b){var e={},j=g.childNodes,d=0,a=j.length,c=[],h;for(;d<a;++d){e[j[d].getId()]=true}for(d=0,a=b.length;d<a;++d){h=b[d];if(!e[h.getId()]){c.push(h)}}return c},removeAll:function(){var a=this.getRootNode();if(a){a.destroy(true)}this.fireEvent("clear",this)},doSort:function(a){var b=this;if(b.remoteSort){b.load()}else{b.tree.sort(a,true);b.fireEvent("datachanged",b);b.fireEvent("refresh",b)}b.fireEvent("sort",b,b.sorters.getRange())}},function(){var a=this.prototype;a.indexSorter=new Ext.util.Sorter({sorterFn:a.sortByIndex})});Ext.define("Ext.data.UuidGenerator",(function(){var h=Math.pow(2,14),g=Math.pow(2,16),e=Math.pow(2,28),c=Math.pow(2,32);function a(k,j){var i=k.toString(16);if(i.length>j){i=i.substring(i.length-j)}else{if(i.length<j){i=Ext.String.leftPad(i,j,"0")}}return i}function d(k,j){var i=Math.random()*(j-k+1);return Math.floor(i)+k}function b(j){if(typeof(j)=="number"){var i=Math.floor(j/c);return{lo:Math.floor(j-i*c),hi:i}}return j}return{extend:Ext.data.IdGenerator,alias:"idgen.uuid",id:"uuid",version:4,constructor:function(){var i=this;i.callParent(arguments);i.parts=[];i.init()},generate:function(){var j=this,k=j.parts,i=j.timestamp;k[0]=a(i.lo,8);k[1]=a(i.hi&65535,4);k[2]=a(((i.hi>>>16)&4095)|(j.version<<12),4);k[3]=a(128|((j.clockSeq>>>8)&63),2)+a(j.clockSeq&255,2);k[4]=a(j.salt.hi,4)+a(j.salt.lo,8);if(j.version==4){j.init()}else{++i.lo;if(i.lo>=c){i.lo=0;++i.hi}}return k.join("-").toLowerCase()},getRecId:function(i){return i.getId()},init:function(){var j=this,i,k;if(j.version==4){j.clockSeq=d(0,h-1);i=j.salt||(j.salt={});k=j.timestamp||(j.timestamp={});i.lo=d(0,c-1);i.hi=d(0,g-1);k.lo=d(0,c-1);k.hi=d(0,e-1)}else{j.salt=b(j.salt);j.timestamp=b(j.timestamp);j.salt.hi|=256}},reconfigure:function(i){Ext.apply(this,i);this.init()}}}()));Ext.define("Ext.data.reader.Xml",{extend:Ext.data.reader.Reader,alternateClassName:"Ext.data.XmlReader",alias:"reader.xml",createAccessor:function(b){var a=this;if(Ext.isEmpty(b)){return Ext.emptyFn}if(Ext.isFunction(b)){return b}return function(c){return a.getNodeValue(Ext.DomQuery.selectNode(b,c))}},getNodeValue:function(a){if(a){if(typeof a.normalize==="function"){a.normalize()}a=a.firstChild;if(a){return a.nodeValue}}return undefined},getResponseData:function(a){var c=a.responseXML,b,d;if(!c){d="XML data not found in the response";b=new Ext.data.ResultSet({total:0,count:0,records:[],success:false,message:d});this.fireEvent("exception",this,a,b);Ext.Logger.warn(d);return b}return this.readRecords(c)},getData:function(a){return a.documentElement||a},getRoot:function(b){var c=b.nodeName,a=this.root;if(!a||(c&&c==a)){return b}else{if(Ext.DomQuery.isXml(b)){return Ext.DomQuery.selectNode(a,b)}}},extractData:function(a){var b=this.record;if(b!=a.nodeName){a=Ext.DomQuery.select(b,a)}else{a=[a]}return this.callParent([a])},getAssociatedDataRoot:function(b,a){return Ext.DomQuery.select(a,b)[0]},readRecords:function(a){if(Ext.isArray(a)){a=a[0]}this.xmlData=a;return this.callParent([a])},createFieldAccessExpression:function(g,d,c){var e=this.namespace,b,a;b=g.mapping||((e?e+"|":"")+g.name);if(typeof b==="function"){a=d+".mapping("+c+", this)"}else{a='me.getNodeValue(Ext.DomQuery.selectNode("'+b+'", '+c+"))"}return a}});Ext.define("Ext.data.writer.Xml",{extend:Ext.data.writer.Writer,alternateClassName:"Ext.data.XmlWriter",alias:"writer.xml",documentRoot:"xmlData",defaultDocumentRoot:"xmlData",header:"",record:"record",writeRecords:function(a,b){var h=this,d=[],c=0,g=b.length,j=h.documentRoot,e=h.record,m=b.length!==1,l,k;d.push(h.header||"");if(!j&&m){j=h.defaultDocumentRoot}if(j){d.push("<",j,">")}for(;c<g;++c){l=b[c];d.push("<",e,">");for(k in l){if(l.hasOwnProperty(k)){d.push("<",k,">",l[k],"</",k,">")}}d.push("</",e,">")}if(j){d.push("</",j,">")}a.xmlData=d.join("");return a}});Ext.define("Ext.data.XmlStore",{extend:Ext.data.Store,alias:"store.xml",constructor:function(a){a=Ext.apply({proxy:{type:"ajax",reader:"xml",writer:"xml"}},a);this.callParent([a])}});Ext.define("Ext.data.association.BelongsTo",{extend:Ext.data.association.Association,alternateClassName:"Ext.data.BelongsToAssociation",alias:"association.belongsto",constructor:function(c){this.callParent(arguments);var e=this,a=e.ownerModel.prototype,g=e.associatedName,d=e.getterName||"get"+g,b=e.setterName||"set"+g;Ext.applyIf(e,{name:g,foreignKey:g.toLowerCase()+"_id",instanceName:g+"BelongsToInstance",associationKey:g.toLowerCase()});a[d]=e.createGetter();a[b]=e.createSetter()},createSetter:function(){var c=this,b=c.foreignKey,a=c.instanceName;return function(h,e,g){var i=h&&h.isModel,d=i?h.getId():h;if(i){this[a]=h}else{if(this[a] instanceof Ext.data.Model&&!this.isEqual(this.get(b),d)){delete this[a]}}this.set(b,d);if(Ext.isFunction(e)){e={callback:e,scope:g||this}}if(Ext.isObject(e)){return this.save(e)}}},createGetter:function(){var d=this,e=d.associatedName,g=d.associatedModel,c=d.foreignKey,b=d.primaryKey,a=d.instanceName;return function(k,l){k=k||{};var j=this,m=j.get(c),n,h,i;if(k.reload===true||j[a]===undefined){h=Ext.ModelManager.create({},e);h.set(b,m);if(typeof k=="function"){k={callback:k,scope:l||j}}n=k.success;k.success=function(o){j[a]=o;if(n){n.apply(this,arguments)}};g.load(m,k);j[a]=h;return h}else{h=j[a];i=[h];l=l||k.scope||j;Ext.callback(k,l,i);Ext.callback(k.success,l,i);Ext.callback(k.failure,l,i);Ext.callback(k.callback,l,i);return h}}},read:function(b,a,c){b[this.instanceName]=a.read([c]).records[0]}});Ext.define("Ext.util.Inflector",{singleton:true,plurals:[[(/(quiz)$/i),"$1zes"],[(/^(ox)$/i),"$1en"],[(/([m|l])ouse$/i),"$1ice"],[(/(matr|vert|ind)ix|ex$/i),"$1ices"],[(/(x|ch|ss|sh)$/i),"$1es"],[(/([^aeiouy]|qu)y$/i),"$1ies"],[(/(hive)$/i),"$1s"],[(/(?:([^f])fe|([lr])f)$/i),"$1$2ves"],[(/sis$/i),"ses"],[(/([ti])um$/i),"$1a"],[(/(buffal|tomat|potat)o$/i),"$1oes"],[(/(bu)s$/i),"$1ses"],[(/(alias|status|sex)$/i),"$1es"],[(/(octop|vir)us$/i),"$1i"],[(/(ax|test)is$/i),"$1es"],[(/^person$/),"people"],[(/^man$/),"men"],[(/^(child)$/),"$1ren"],[(/s$/i),"s"],[(/$/),"s"]],singulars:[[(/(quiz)zes$/i),"$1"],[(/(matr)ices$/i),"$1ix"],[(/(vert|ind)ices$/i),"$1ex"],[(/^(ox)en/i),"$1"],[(/(alias|status)es$/i),"$1"],[(/(octop|vir)i$/i),"$1us"],[(/(cris|ax|test)es$/i),"$1is"],[(/(shoe)s$/i),"$1"],[(/(o)es$/i),"$1"],[(/(bus)es$/i),"$1"],[(/([m|l])ice$/i),"$1ouse"],[(/(x|ch|ss|sh)es$/i),"$1"],[(/(m)ovies$/i),"$1ovie"],[(/(s)eries$/i),"$1eries"],[(/([^aeiouy]|qu)ies$/i),"$1y"],[(/([lr])ves$/i),"$1f"],[(/(tive)s$/i),"$1"],[(/(hive)s$/i),"$1"],[(/([^f])ves$/i),"$1fe"],[(/(^analy)ses$/i),"$1sis"],[(/((a)naly|(b)a|(d)iagno|(p)arenthe|(p)rogno|(s)ynop|(t)he)ses$/i),"$1$2sis"],[(/([ti])a$/i),"$1um"],[(/(n)ews$/i),"$1ews"],[(/people$/i),"person"],[(/s$/i),""]],uncountable:["sheep","fish","series","species","money","rice","information","equipment","grass","mud","offspring","deer","means"],singular:function(b,a){this.singulars.unshift([b,a])},plural:function(b,a){this.plurals.unshift([b,a])},clearSingulars:function(){this.singulars=[]},clearPlurals:function(){this.plurals=[]},isTransnumeral:function(a){return Ext.Array.indexOf(this.uncountable,a)!=-1},pluralize:function(g){if(this.isTransnumeral(g)){return g}var e=this.plurals,d=e.length,a,c,b;for(b=0;b<d;b++){a=e[b];c=a[0];if(c==g||(c.test&&c.test(g))){return g.replace(c,a[1])}}return g},singularize:function(g){if(this.isTransnumeral(g)){return g}var e=this.singulars,d=e.length,a,c,b;for(b=0;b<d;b++){a=e[b];c=a[0];if(c==g||(c.test&&c.test(g))){return g.replace(c,a[1])}}return g},classify:function(a){return Ext.String.capitalize(this.singularize(a))},ordinalize:function(d){var b=parseInt(d,10),c=b%10,a=b%100;if(11<=a&&a<=13){return d+"th"}else{switch(c){case 1:return d+"st";case 2:return d+"nd";case 3:return d+"rd";default:return d+"th"}}}},function(){var b={alumnus:"alumni",cactus:"cacti",focus:"foci",nucleus:"nuclei",radius:"radii",stimulus:"stimuli",ellipsis:"ellipses",paralysis:"paralyses",oasis:"oases",appendix:"appendices",index:"indexes",beau:"beaux",bureau:"bureaux",tableau:"tableaux",woman:"women",child:"children",man:"men",corpus:"corpora",criterion:"criteria",curriculum:"curricula",genus:"genera",memorandum:"memoranda",phenomenon:"phenomena",foot:"feet",goose:"geese",tooth:"teeth",antenna:"antennae",formula:"formulae",nebula:"nebulae",vertebra:"vertebrae",vita:"vitae"},a;for(a in b){this.plural(a,b[a]);this.singular(b[a],a)}});Ext.define("Ext.data.association.HasMany",{extend:Ext.data.association.Association,alternateClassName:"Ext.data.HasManyAssociation",alias:"association.hasmany",constructor:function(c){var d=this,a,b;d.callParent(arguments);d.name=d.name||Ext.util.Inflector.pluralize(d.associatedName.toLowerCase());a=d.ownerModel.prototype;b=d.name;Ext.applyIf(d,{storeName:b+"Store",foreignKey:d.ownerName.toLowerCase()+"_id"});a[b]=d.createStore()},createStore:function(){var h=this,i=h.associatedModel,c=h.storeName,d=h.foreignKey,a=h.primaryKey,g=h.filterProperty,b=h.autoLoad,e=h.storeConfig||{};return function(){var m=this,k,l,j={};if(m[c]===undefined){if(g){l={property:g,value:m.get(g),exactMatch:true}}else{l={property:d,value:m.get(a),exactMatch:true}}j[d]=m.get(a);k=Ext.apply({},e,{model:i,filters:[l],remoteFilter:false,modelDefaults:j});m[c]=Ext.data.AbstractStore.create(k);if(b){m[c].load()}}return m[c]}},read:function(d,b,j){var g=d[this.name](),c,e,a,h;g.add(b.read(j).records);c=this.associatedModel.prototype.associations.findBy(function(i){return i.type==="belongsTo"&&i.associatedName===d.$className});if(c){e=g.data.items;a=e.length;for(h=0;h<a;h++){e[h][c.instanceName]=d}}}});Ext.define("Ext.data.association.HasOne",{extend:Ext.data.association.Association,alternateClassName:"Ext.data.HasOneAssociation",alias:"association.hasone",constructor:function(c){this.callParent(arguments);var e=this,a=e.ownerModel.prototype,g=e.associatedName,d=e.getterName||"get"+g,b=e.setterName||"set"+g;Ext.applyIf(e,{name:g,foreignKey:g.toLowerCase()+"_id",instanceName:g+"HasOneInstance",associationKey:g.toLowerCase()});a[d]=e.createGetter();a[b]=e.createSetter()},createSetter:function(){var c=this,b=c.foreignKey,a=c.instanceName;return function(h,e,g){var i=h&&h.isModel,d=i?h.getId():h;if(i){this[a]=h}else{if(this[a] instanceof Ext.data.Model&&!this.isEqual(this.get(b),d)){delete this[a]}}this.set(b,d);if(Ext.isFunction(e)){e={callback:e,scope:g||this}}if(Ext.isObject(e)){return this.save(e)}}},createGetter:function(){var d=this,g=d.ownerModel,e=d.associatedName,h=d.associatedModel,c=d.foreignKey,b=d.primaryKey,a=d.instanceName;return function(l,m){l=l||{};var k=this,n=k.get(c),o,i,j;if(l.reload===true||k[a]===undefined){i=Ext.ModelManager.create({},e);i.set(b,n);if(typeof l=="function"){l={callback:l,scope:m||k}}o=l.success;l.success=function(p){k[a]=p;if(o){o.apply(this,arguments)}};h.load(n,l);k[a]=i;return i}else{i=k[a];j=[i];m=m||l.scope||k;Ext.callback(l,m,j);Ext.callback(l.success,m,j);Ext.callback(l.failure,m,j);Ext.callback(l.callback,m,j);return i}}},read:function(c,a,e){var b=this.associatedModel.prototype.associations.findBy(function(g){return g.type==="belongsTo"&&g.associatedName===c.$className}),d=a.read([e]).records[0];c[this.instanceName]=d;if(b){d[b.instanceName]=c}}});Ext.define("Ext.data.proxy.WebStorage",{extend:Ext.data.proxy.Client,alternateClassName:"Ext.data.WebStorageProxy",id:undefined,constructor:function(a){this.callParent(arguments);this.cache={};this.id=this.id||(this.store?this.store.storeId:undefined);this.initialize()},create:function(e,k,l){var j=this,d=e.records,c=d.length,a=j.getIds(),b,h,g;e.setStarted();if(j.isHierarchical===undefined){j.isHierarchical=!!d[0].isNode;if(j.isHierarchical){j.getStorageObject().setItem(j.getTreeKey(),true)}}for(g=0;g<c;g++){h=d[g];if(h.phantom){h.phantom=false;b=j.getNextId()}else{b=h.getId()}j.setRecord(h,b);h.commit();a.push(b)}j.setIds(a);e.setCompleted();e.setSuccessful();if(typeof k=="function"){k.call(l||j,e)}},read:function(g,m,o){var l=this,e=[],j=0,n=true,d=l.model,a,c,k,h,b;g.setStarted();if(l.isHierarchical){e=l.getTreeData()}else{a=l.getIds();c=a.length;b=g.id;if(b){h=l.getRecord(b);if(h!==null){k=new d(h,b,h)}if(k){e.push(k)}else{n=false}}else{for(;j<c;j++){b=a[j];h=l.getRecord(b);e.push(new d(h,b,h))}}}if(n){g.setSuccessful()}g.setCompleted();g.resultSet=Ext.create("Ext.data.ResultSet",{records:e,total:e.length,loaded:true});if(typeof m=="function"){m.call(o||l,g)}},update:function(e,j,k){var d=e.records,c=d.length,a=this.getIds(),h,b,g;e.setStarted();for(g=0;g<c;g++){h=d[g];this.setRecord(h);h.commit();b=h.getId();if(b!==undefined&&Ext.Array.indexOf(a,b)==-1){a.push(b)}}this.setIds(a);e.setCompleted();e.setSuccessful();if(typeof j=="function"){j.call(k||this,e)}},destroy:function(d,k,l){var g=this,c=d.records,a=g.getIds(),h=a.length,m=[],j={},e=c.length,b;d.setStarted();for(;e--;){Ext.apply(j,g.removeRecord(c[e]))}for(e=0;e<h;e++){b=a[e];if(!j[b]){m.push(b)}}g.setIds(m);d.setCompleted();d.setSuccessful();if(typeof k=="function"){k.call(l||g,d)}},getRecord:function(d){var b=this,a=b.cache,c=!a[d]?Ext.decode(b.getStorageObject().getItem(b.getRecordKey(d))):a[d];if(!c){return null}a[d]=c;c[b.model.prototype.idProperty]=d;return c},setRecord:function(k,c){if(c){k.setId(c)}else{c=k.getId()}var m=this,a=k.data,h={},j=m.model,l=j.prototype.fields.items,d=l.length,g=0,n,b,e,o;for(;g<d;g++){n=l[g];b=n.name;if(n.persist){h[b]=a[b]}}delete h[m.model.prototype.idProperty];if(k.isNode&&k.get("depth")===1){delete h.parentId}e=m.getStorageObject();o=m.getRecordKey(c);m.cache[c]=h;e.removeItem(o);e.setItem(o,Ext.encode(h))},removeRecord:function(a){var d=this,g=a.getId(),b={},c,e;b[g]=a;d.getStorageObject().removeItem(d.getRecordKey(g));delete d.cache[g];if(a.childNodes){e=a.childNodes;for(c=e.length;c--;){Ext.apply(b,d.removeRecord(e[c]))}}return b},getRecordKey:function(a){if(a.isModel){a=a.getId()}return Ext.String.format("{0}-{1}",this.id,a)},getRecordCounterKey:function(){return Ext.String.format("{0}-counter",this.id)},getTreeKey:function(){return Ext.String.format("{0}-tree",this.id)},getIds:function(){var g=this,d=(g.getStorageObject().getItem(g.id)||"").split(","),b=g.model,e=d.length,a=b.prototype.fields.get(b.prototype.idProperty).type.type==="string",c;if(e==1&&d[0]===""){d=[]}else{for(c=0;c<e;c++){d[c]=a?d[c]:+d[c]}}return d},setIds:function(a){var b=this.getStorageObject(),c=a.join(",");b.removeItem(this.id);if(!Ext.isEmpty(c)){b.setItem(this.id,c)}},getNextId:function(){var d=this,e=d.getStorageObject(),c=d.getRecordCounterKey(),b=d.model,a=b.prototype.fields.get(b.prototype.idProperty).type.type==="string",g;g=d.idGenerator.generate();e.setItem(c,g);if(!a){g=+g}return g},getTreeData:function(){var n=this,a=n.getIds(),e=a.length,j=[],b={},o=[],k=0,h=n.model,q=h.prototype.idProperty,g,m,p,l,d,c;for(;k<e;k++){c=a[k];m=n.getRecord(c);j.push(m);b[c]=m;if(!m.parentId){o.push(m)}}g=o.length;Ext.Array.sort(j,n.sortByParentId);for(k=g;k<e;k++){m=j[k];l=m.parentId;if(!p||p[q]!==l){p=b[l];p.children=d=[]}d.push(m)}for(k=e;k--;){m=j[k];if(!m.children&&!m.leaf){m.loaded=true}}for(k=g;k--;){m=o[k];o[k]=new h(m,m[q],m)}return o},sortByParentId:function(b,a){return(b.parentId||0)-(a.parentId||0)},initialize:function(){var b=this,a=b.getStorageObject(),c=+a.getItem(b.getRecordCounterKey());a.setItem(b.id,a.getItem(b.id)||"");if(a.getItem(b.getTreeKey())){b.isHierarchical=true}b.idGenerator=new Ext.data.SequentialIdGenerator({seed:c?c+1:1})},clear:function(){var d=this,e=d.getStorageObject(),c=d.getIds(),a=c.length,b;for(b=0;b<a;b++){e.removeItem(d.getRecordKey(c[b]))}e.removeItem(d.getRecordCounterKey());e.removeItem(d.getTreeKey());e.removeItem(d.id);d.cache={}},getStorageObject:function(){}});Ext.define("Ext.data.proxy.LocalStorage",{extend:Ext.data.proxy.WebStorage,alias:"proxy.localstorage",alternateClassName:"Ext.data.LocalStorageProxy",getStorageObject:function(){return window.localStorage}});Ext.define("Ext.data.proxy.Rest",{extend:Ext.data.proxy.Ajax,alternateClassName:"Ext.data.RestProxy",alias:"proxy.rest",actionMethods:{create:"POST",read:"GET",update:"PUT",destroy:"DELETE"},appendId:true,batchActions:false,buildUrl:function(g){var e=this,c=g.operation,b=c.records||[],a=b[0],h=e.format,d=e.getUrl(g),i=a?a.getId():c.id;if(e.appendId&&(i!=null)){if(!d.match(/\/$/)){d+="/"}d+=i}if(h){if(!d.match(/\.$/)){d+="."}d+=h}g.url=d;return e.callParent(arguments)}});Ext.define("Ext.data.proxy.SessionStorage",{extend:Ext.data.proxy.WebStorage,alias:"proxy.sessionstorage",alternateClassName:"Ext.data.SessionStorageProxy",getStorageObject:function(){return window.sessionStorage}});Ext.define("Ext.dd.DDTarget",{extend:Ext.dd.DragDrop,constructor:function(c,a,b){if(c){this.initTarget(c,a,b)}},getDragEl:Ext.emptyFn,isValidHandleChild:Ext.emptyFn,startDrag:Ext.emptyFn,endDrag:Ext.emptyFn,onDrag:Ext.emptyFn,onDragDrop:Ext.emptyFn,onDragEnter:Ext.emptyFn,onDragOut:Ext.emptyFn,onDragOver:Ext.emptyFn,onInvalidDrop:Ext.emptyFn,onMouseDown:Ext.emptyFn,onMouseUp:Ext.emptyFn,setXConstraint:Ext.emptyFn,setYConstraint:Ext.emptyFn,resetConstraints:Ext.emptyFn,clearConstraints:Ext.emptyFn,clearTicks:Ext.emptyFn,setInitPosition:Ext.emptyFn,setDragElId:Ext.emptyFn,setHandleElId:Ext.emptyFn,setOuterHandleElId:Ext.emptyFn,addInvalidHandleClass:Ext.emptyFn,addInvalidHandleId:Ext.emptyFn,addInvalidHandleType:Ext.emptyFn,removeInvalidHandleClass:Ext.emptyFn,removeInvalidHandleId:Ext.emptyFn,removeInvalidHandleType:Ext.emptyFn,toString:function(){return("DDTarget "+this.id)}});Ext.define("Ext.dd.DragTracker",{mixins:{observable:Ext.util.Observable},active:false,trackOver:false,tolerance:5,autoStart:false,constructor:function(a){var b=this;Ext.apply(b,a);b.addEvents("mouseover","mouseout","mousedown","mouseup","mousemove","beforedragstart","dragstart","dragend","drag");b.dragRegion=new Ext.util.Region(0,0,0,0);if(b.el){b.initEl(b.el)}b.mixins.observable.constructor.call(b);if(b.disabled){b.disable()}},initEl:function(a){var b=this;b.el=Ext.get(a);b.handle=Ext.get(b.delegate);b.delegate=b.handle?undefined:b.delegate;if(!b.handle){b.handle=b.el}b.handleListeners={scope:b,delegate:b.delegate,mousedown:b.onMouseDown};if(b.trackOver||b.overCls){Ext.apply(b.handleListeners,{mouseover:b.onMouseOver,mouseout:b.onMouseOut})}b.mon(b.handle,b.handleListeners)},disable:function(){this.disabled=true},enable:function(){this.disabled=false},destroy:function(){var a=this;if(a.active){a.endDrag({})}a.clearListeners();a.mun(a.handle,a.handleListeners);a.el=a.handle=null},onMouseOver:function(c,b){var a=this;if(!a.disabled){if(Ext.EventManager.contains(c)||a.delegate){a.mouseIsOut=false;if(a.overCls){a.el.addCls(a.overCls)}a.fireEvent("mouseover",a,c,a.delegate?c.getTarget(a.delegate,b):a.handle)}}},onMouseOut:function(b){var a=this;if(a.mouseIsDown){a.mouseIsOut=true}else{if(a.overCls){a.el.removeCls(a.overCls)}a.fireEvent("mouseout",a,b)}},onMouseDown:function(d,c){var b=this,a;if(b.disabled||d.dragTracked){return}b.dragTarget=b.delegate?c:b.handle.dom;b.startXY=b.lastXY=d.getXY();b.startRegion=Ext.fly(b.dragTarget).getRegion();if(b.fireEvent("mousedown",b,d)===false||b.fireEvent("beforedragstart",b,d)===false||b.onBeforeStart(d)===false){return}b.mouseIsDown=true;d.dragTracked=true;a=b.el.dom;if(Ext.isIE&&a.setCapture){a.setCapture()}if(b.preventDefault!==false){d.preventDefault()}Ext.getDoc().on({scope:b,mouseup:b.onMouseUp,mousemove:b.onMouseMove,selectstart:b.stopSelect});if(b.autoStart){b.timer=Ext.defer(b.triggerStart,b.autoStart===true?1000:b.autoStart,b,[d])}},onMouseMove:function(g,d){var b=this,c=g.getXY(),a=b.startXY;g.preventDefault();b.lastXY=c;if(!b.active){if(Math.max(Math.abs(a[0]-c[0]),Math.abs(a[1]-c[1]))>b.tolerance){b.triggerStart(g)}else{return}}if(b.fireEvent("mousemove",b,g)===false){b.onMouseUp(g)}else{b.onDrag(g);b.fireEvent("drag",b,g)}},onMouseUp:function(b){var a=this;a.mouseIsDown=false;if(a.mouseIsOut){a.mouseIsOut=false;a.onMouseOut(b)}b.preventDefault();if(Ext.isIE&&document.releaseCapture){document.releaseCapture()}a.fireEvent("mouseup",a,b);a.endDrag(b)},endDrag:function(d){var b=this,c=Ext.getDoc(),a=b.active;c.un("mousemove",b.onMouseMove,b);c.un("mouseup",b.onMouseUp,b);c.un("selectstart",b.stopSelect,b);b.clearStart();b.active=false;if(a){b.onEnd(d);b.fireEvent("dragend",b,d)}delete b._constrainRegion;delete Ext.EventObject.dragTracked},triggerStart:function(b){var a=this;a.clearStart();a.active=true;a.onStart(b);a.fireEvent("dragstart",a,b)},clearStart:function(){var a=this.timer;if(a){clearTimeout(a);delete this.timer}},stopSelect:function(a){a.stopEvent();return false},onBeforeStart:function(a){},onStart:function(a){},onDrag:function(a){},onEnd:function(a){},getDragTarget:function(){return this.dragTarget},getDragCt:function(){return this.el},getConstrainRegion:function(){var a=this;if(a.constrainTo){if(a.constrainTo instanceof Ext.util.Region){return a.constrainTo}if(!a._constrainRegion){a._constrainRegion=Ext.fly(a.constrainTo).getViewRegion()}}else{if(!a._constrainRegion){a._constrainRegion=a.getDragCt().getViewRegion()}}return a._constrainRegion},getXY:function(a){return a?this.constrainModes[a](this,this.lastXY):this.lastXY},getOffset:function(c){var b=this.getXY(c),a=this.startXY;return[b[0]-a[0],b[1]-a[1]]},constrainModes:{point:function(b,d){var c=b.dragRegion,a=b.getConstrainRegion();if(!a){return d}c.x=c.left=c[0]=c.right=d[0];c.y=c.top=c[1]=c.bottom=d[1];c.constrainTo(a);return[c.left,c.top]},dragTarget:function(c,g){var b=c.startXY,e=c.startRegion.copy(),a=c.getConstrainRegion(),d;if(!a){return g}e.translateBy(g[0]-b[0],g[1]-b[1]);if(e.right>a.right){g[0]+=d=(a.right-e.right);e.left+=d}if(e.left<a.left){g[0]+=(a.left-e.left)}if(e.bottom>a.bottom){g[1]+=d=(a.bottom-e.bottom);e.top+=d}if(e.top<a.top){g[1]+=(a.top-e.top)}return g}}});Ext.define("Ext.dd.DragZone",{extend:Ext.dd.DragSource,constructor:function(c,b){var d=this,a=d.containerScroll;d.callParent([c,b]);if(a){c=d.scrollEl||c;c=Ext.get(c);if(Ext.isObject(a)){c.ddScrollConfig=a}Ext.dd.ScrollManager.register(c)}},getDragData:function(a){return Ext.dd.Registry.getHandleFromEvent(a)},onInitDrag:function(a,b){this.proxy.update(this.dragData.ddel.cloneNode(true));this.onStartDrag(a,b);return true},getRepairXY:function(a){return Ext.fly(this.dragData.ddel).getXY()},destroy:function(){this.callParent();if(this.containerScroll){Ext.dd.ScrollManager.unregister(this.scrollEl||this.el)}}});Ext.define("Ext.dd.ScrollManager",{singleton:true,constructor:function(){var a=Ext.dd.DragDropManager;a.fireEvents=Ext.Function.createSequence(a.fireEvents,this.onFire,this);a.stopDrag=Ext.Function.createSequence(a.stopDrag,this.onStop,this);this.doScroll=Ext.Function.bind(this.doScroll,this);this.ddmInstance=a;this.els={};this.dragEl=null;this.proc={}},onStop:function(a){var b=Ext.dd.ScrollManager;b.dragEl=null;b.clearProc()},triggerRefresh:function(){if(this.ddmInstance.dragCurrent){this.ddmInstance.refreshCache(this.ddmInstance.dragCurrent.groups)}},doScroll:function(){if(this.ddmInstance.dragCurrent){var a=this.proc,b=a.el,c=a.el.ddScrollConfig,d=c?c.increment:this.increment;if(!this.animate){if(b.scroll(a.dir,d)){this.triggerRefresh()}}else{b.scroll(a.dir,d,true,this.animDuration,this.triggerRefresh)}}},clearProc:function(){var a=this.proc;if(a.id){clearInterval(a.id)}a.id=0;a.el=null;a.dir=""},startProc:function(b,a){this.clearProc();this.proc.el=b;this.proc.dir=a;var d=b.ddScrollConfig?b.ddScrollConfig.ddGroup:undefined,c=(b.ddScrollConfig&&b.ddScrollConfig.frequency)?b.ddScrollConfig.frequency:this.frequency;if(d===undefined||this.ddmInstance.dragCurrent.ddGroup==d){this.proc.id=setInterval(this.doScroll,c)}},onFire:function(h,k){if(k||!this.ddmInstance.dragCurrent){return}if(!this.dragEl||this.dragEl!=this.ddmInstance.dragCurrent){this.dragEl=this.ddmInstance.dragCurrent;this.refreshCache()}var l=h.getXY(),m=h.getPoint(),i=this.proc,g=this.els,b,d,a,j;for(b in g){d=g[b];a=d._region;j=d.ddScrollConfig?d.ddScrollConfig:this;if(a&&a.contains(m)&&d.isScrollable()){if(a.bottom-m.y<=j.vthresh){if(i.el!=d){this.startProc(d,"down")}return}else{if(a.right-m.x<=j.hthresh){if(i.el!=d){this.startProc(d,"left")}return}else{if(m.y-a.top<=j.vthresh){if(i.el!=d){this.startProc(d,"up")}return}else{if(m.x-a.left<=j.hthresh){if(i.el!=d){this.startProc(d,"right")}return}}}}}}this.clearProc()},register:function(c){if(Ext.isArray(c)){for(var b=0,a=c.length;b<a;b++){this.register(c[b])}}else{c=Ext.get(c);this.els[c.id]=c}},unregister:function(c){if(Ext.isArray(c)){for(var b=0,a=c.length;b<a;b++){this.unregister(c[b])}}else{c=Ext.get(c);delete this.els[c.id]}},vthresh:25,hthresh:25,increment:100,frequency:500,animate:true,animDuration:0.4,ddGroup:undefined,refreshCache:function(){var a=this.els,b;for(b in a){if(typeof a[b]=="object"){a[b]._region=a[b].getRegion()}}}});Ext.define("Ext.dd.DropTarget",{extend:Ext.dd.DDTarget,constructor:function(b,a){this.el=Ext.get(b);Ext.apply(this,a);if(this.containerScroll){Ext.dd.ScrollManager.register(this.el)}this.callParent([this.el.dom,this.ddGroup||this.group,{isTarget:true}])},dropAllowed:Ext.baseCSSPrefix+"dd-drop-ok",dropNotAllowed:Ext.baseCSSPrefix+"dd-drop-nodrop",isTarget:true,isNotifyTarget:true,notifyEnter:function(a,c,b){if(this.overClass){this.el.addCls(this.overClass)}return this.dropAllowed},notifyOver:function(a,c,b){return this.dropAllowed},notifyOut:function(a,c,b){if(this.overClass){this.el.removeCls(this.overClass)}},notifyDrop:function(a,c,b){return false},destroy:function(){this.callParent();if(this.containerScroll){Ext.dd.ScrollManager.unregister(this.el)}}});Ext.define("Ext.dd.Registry",{singleton:true,constructor:function(){this.elements={};this.handles={};this.autoIdSeed=0},getId:function(b,a){if(typeof b=="string"){return b}var c=b.id;if(!c&&a!==false){c="extdd-"+(++this.autoIdSeed);b.id=c}return c},register:function(d,e){e=e||{};if(typeof d=="string"){d=document.getElementById(d)}e.ddel=d;this.elements[this.getId(d)]=e;if(e.isHandle!==false){this.handles[e.ddel.id]=e}if(e.handles){var c=e.handles,b,a;for(b=0,a=c.length;b<a;b++){this.handles[this.getId(c[b])]=e}}},unregister:function(d){var g=this.getId(d,false),e=this.elements[g],c,b,a;if(e){delete this.elements[g];if(e.handles){c=e.handles;for(b=0,a=c.length;b<a;b++){delete this.handles[this.getId(c[b],false)]}}}},getHandle:function(a){if(typeof a!="string"){a=a.id}return this.handles[a]},getHandleFromEvent:function(b){var a=b.getTarget();return a?this.handles[a.id]:null},getTarget:function(a){if(typeof a!="string"){a=a.id}return this.elements[a]},getTargetFromEvent:function(b){var a=b.getTarget();return a?this.elements[a.id]||this.handles[a.id]:null}});Ext.define("Ext.dd.DropZone",{extend:Ext.dd.DropTarget,getTargetFromEvent:function(a){return Ext.dd.Registry.getTargetFromEvent(a)},onNodeEnter:function(d,a,c,b){},onNodeOver:function(d,a,c,b){return this.dropAllowed},onNodeOut:function(d,a,c,b){},onNodeDrop:function(d,a,c,b){return false},onContainerOver:function(a,c,b){return this.dropNotAllowed},onContainerDrop:function(a,c,b){return false},notifyEnter:function(a,c,b){return this.dropNotAllowed},notifyOver:function(a,c,b){var d=this.getTargetFromEvent(c);if(!d){if(this.lastOverNode){this.onNodeOut(this.lastOverNode,a,c,b);this.lastOverNode=null}return this.onContainerOver(a,c,b)}if(this.lastOverNode!=d){if(this.lastOverNode){this.onNodeOut(this.lastOverNode,a,c,b)}this.onNodeEnter(d,a,c,b);this.lastOverNode=d}return this.onNodeOver(d,a,c,b)},notifyOut:function(a,c,b){if(this.lastOverNode){this.onNodeOut(this.lastOverNode,a,c,b);this.lastOverNode=null}},notifyDrop:function(b,g,d){var c=this,h=c.getTargetFromEvent(g),a=h?c.onNodeDrop(h,b,g,d):c.onContainerDrop(b,g,d);if(c.lastOverNode){c.onNodeOut(c.lastOverNode,b,g,d);c.lastOverNode=null}return a},triggerCacheRefresh:function(){Ext.dd.DDM.refreshCache(this.groups)}});Ext.define("Ext.direct.Event",{alias:"direct.event",status:true,constructor:function(a){Ext.apply(this,a)},getName:function(){return this.name},getData:function(){return this.data}});Ext.define("Ext.direct.RemotingEvent",{extend:Ext.direct.Event,alias:"direct.rpc",getTransaction:function(){var a=this;return a.transaction||Ext.direct.Manager.getTransaction(a.tid)}});Ext.define("Ext.direct.ExceptionEvent",{extend:Ext.direct.RemotingEvent,alias:"direct.exception",status:false});Ext.define("Ext.direct.JsonProvider",{extend:Ext.direct.Provider,alias:"direct.jsonprovider",parseResponse:function(a){if(!Ext.isEmpty(a.responseText)){if(Ext.isObject(a.responseText)){return a.responseText}return Ext.decode(a.responseText)}return null},createEvents:function(b){var h=this,j=null,d=[],g,c,a;try{j=h.parseResponse(b)}catch(k){g=new Ext.direct.ExceptionEvent({data:k,xhr:b,code:Ext.direct.Manager.exceptions.PARSE,message:"Error parsing json response: \n\n "+k});return[g]}if(Ext.isArray(j)){for(c=0,a=j.length;c<a;++c){d.push(h.createEvent(j[c]))}}else{if(Ext.isObject(j)){d.push(h.createEvent(j))}}return d},createEvent:function(a){return Ext.create("direct."+a.type,a)}});Ext.define("Ext.direct.PollingProvider",{extend:Ext.direct.JsonProvider,alias:"direct.pollingprovider",interval:3000,constructor:function(a){var b=this;b.callParent(arguments);b.addEvents("beforepoll","poll")},isConnected:function(){return !!this.pollTask},connect:function(){var b=this,a=b.url;if(a&&!b.pollTask){b.pollTask=Ext.TaskManager.start({run:b.runPoll,interval:b.interval,scope:b});b.fireEvent("connect",b)}},disconnect:function(){var a=this;if(a.pollTask){Ext.TaskManager.stop(a.pollTask);delete a.pollTask;a.fireEvent("disconnect",a)}},runPoll:function(){var b=this,a=b.url;if(b.fireEvent("beforepoll",b)!==false){if(Ext.isFunction(a)){a(b.baseParams)}else{Ext.Ajax.request({url:a,callback:b.onData,scope:b,params:b.baseParams})}b.fireEvent("poll",b)}},onData:function(e,h,b){var g=this,d,a,c;if(h){c=g.createEvents(b);for(d=0,a=c.length;d<a;++d){g.fireEvent("data",g,c[d])}}else{c=new Ext.direct.ExceptionEvent({data:null,code:Ext.direct.Manager.exceptions.TRANSPORT,message:"Unable to connect to the server.",xhr:b});g.fireEvent("data",g,c)}}});Ext.define("Ext.direct.RemotingMethod",{constructor:function(c){var d=this,h=Ext.isDefined(c.params)?c.params:c.len,b,a,e,g;d.name=c.name;d.formHandler=c.formHandler;if(Ext.isNumeric(h)){d.len=h;d.ordered=true}else{d.params={};a=h.length;for(e=0;e<a;e++){g=h[e];b=Ext.isObject(g)?g.name:g;d.params[b]=true}}},getArgs:function(g,b,h){var e=this,c=[],d,a;if(e.ordered){if(e.len>0){if(b){for(d=0,a=b.length;d<a;d++){c.push(g[b[d]])}}else{if(h){c.push(g)}}}}else{c.push(g)}return c},getCallData:function(e){var g=this,c=null,d=g.len,b=g.params,h,i,a,j;if(g.ordered){h=e[d];i=e[d+1];j=e[d+2];if(d!==0){c=e.slice(0,d)}}else{c=Ext.apply({},e[0]);h=e[1];i=e[2];j=e[3];for(a in c){if(c.hasOwnProperty(a)&&!b[a]){delete c[a]}}}return{data:c,callback:h,scope:i,options:j}}});Ext.define("Ext.direct.Transaction",{alias:"direct.transaction",alternateClassName:"Ext.Direct.Transaction",statics:{TRANSACTION_ID:0},constructor:function(a){var b=this;Ext.apply(b,a);b.id=b.tid=++b.self.TRANSACTION_ID;b.retryCount=0},send:function(){var a=this;a.provider.queueTransaction(a)},retry:function(){var a=this;a.retryCount++;a.send()},getProvider:function(){return this.provider}});Ext.define("Ext.direct.RemotingProvider",{extend:Ext.direct.JsonProvider,alias:"direct.remotingprovider",enableBuffer:10,maxRetries:1,constructor:function(a){var b=this;b.callParent(arguments);b.addEvents("beforecall","call","beforecallback");b.namespace=(Ext.isString(b.namespace))?Ext.ns(b.namespace):b.namespace||Ext.global;b.transactions=new Ext.util.MixedCollection();b.callBuffer=[]},getNamespace:function(b,e){var g,d,c,a;b=b||Ext.global;g=e.toString().split(".");for(c=0,a=g.length;c<a;c++){d=g[c];b=b[d];if(typeof b==="undefined"){return b}}return b},createNamespaces:function(b,e){var g,d;b=b||Ext.global;g=e.toString().split(".");for(var c=0,a=g.length;c<a;c++){d=g[c];b[d]=b[d]||{};b=b[d]}return b},initAPI:function(){var j=this,e=j.actions,c=j.namespace,d,k,b,g,h,a;for(d in e){if(e.hasOwnProperty(d)){if(j.disableNestedActions){k=c[d];if(!k){k=c[d]={}}}else{k=j.getNamespace(c,d);if(!k){k=j.createNamespaces(c,d)}}b=e[d];for(g=0,h=b.length;g<h;++g){a=new Ext.direct.RemotingMethod(b[g]);k[a.name]=j.createHandler(d,a)}}}},createHandler:function(c,e){var b=this,d=Array.prototype.slice,a;if(!e.formHandler){a=function(){b.configureRequest(c,e,d.call(arguments,0))}}else{a=function(h,i,g){b.configureFormRequest(c,e,h,i,g)}}a.directCfg={action:c,method:e};return a},isConnected:function(){return !!this.connected},connect:function(){var a=this;if(a.url){a.initAPI();a.connected=true;a.fireEvent("connect",a)}},disconnect:function(){var a=this;if(a.connected){a.connected=false;a.fireEvent("disconnect",a)}},runCallback:function(g,c){var e=!!c.status,d=e?"success":"failure",h,b,a;if(g&&g.callback){h=g.callback;b=g.callbackOptions;a=typeof c.result!=="undefined"?c.result:c.data;if(Ext.isFunction(h)){h(a,c,e,b)}else{Ext.callback(h[d],h.scope,[a,c,e,b]);Ext.callback(h.callback,h.scope,[a,c,e,b])}}},onData:function(l,j,c){var g=this,d,e,k,a,b,h;if(j){k=g.createEvents(c);for(d=0,e=k.length;d<e;++d){a=k[d];b=g.getTransaction(a);g.fireEvent("data",g,a);if(b&&g.fireEvent("beforecallback",g,a,b)!==false){g.runCallback(b,a,true);Ext.direct.Manager.removeTransaction(b)}}}else{h=[].concat(l.transaction);for(d=0,e=h.length;d<e;++d){b=g.getTransaction(h[d]);if(b&&b.retryCount<g.maxRetries){b.retry()}else{a=new Ext.direct.ExceptionEvent({data:null,transaction:b,code:Ext.direct.Manager.exceptions.TRANSPORT,message:"Unable to connect to the server.",xhr:c});g.fireEvent("data",g,a);if(b&&g.fireEvent("beforecallback",g,b)!==false){g.runCallback(b,a,false);Ext.direct.Manager.removeTransaction(b)}}}}},getTransaction:function(a){return a&&a.tid?Ext.direct.Manager.getTransaction(a.tid):null},configureRequest:function(g,b,i){var j=this,d,h,k,l,a,c,e;d=b.getCallData(i);h=d.data;k=d.callback;l=d.scope;a=d.options||{};e=Ext.apply({},{provider:j,args:i,action:g,method:b.name,data:h,callbackOptions:a,callback:l&&Ext.isFunction(k)?Ext.Function.bind(k,l):k});if(a.timeout){Ext.applyIf(e,{timeout:a.timeout})}c=new Ext.direct.Transaction(e);if(j.fireEvent("beforecall",j,c,b)!==false){Ext.direct.Manager.addTransaction(c);j.queueTransaction(c);j.fireEvent("call",j,c,b)}},getCallData:function(a){return{action:a.action,method:a.method,data:a.data,type:"rpc",tid:a.id}},sendRequest:function(h){var g=this,e,b,j,d=g.enableUrlEncode,c,a;e={url:g.url,callback:g.onData,scope:g,transaction:h,timeout:g.timeout};if(h.timeout){e.timeout=h.timeout}if(Ext.isArray(h)){b=[];for(c=0,a=h.length;c<a;++c){b.push(g.getCallData(h[c]))}}else{b=g.getCallData(h)}if(d){j={};j[Ext.isString(d)?d:"data"]=Ext.encode(b);e.params=j}else{e.jsonData=b}Ext.Ajax.request(e)},queueTransaction:function(c){var b=this,a=b.enableBuffer;if(c.form){b.sendFormRequest(c);return}if(typeof c.timeout!=="undefined"){b.sendRequest(c);return}if(a){b.callBuffer.push(c);if(!b.callTask){b.callTask=new Ext.util.DelayedTask(b.combineAndSend,b)}b.callTask.delay(Ext.isNumber(a)?a:10)}else{b.combineAndSend()}},combineAndSend:function(){var c=this,b=c.callBuffer,a=b.length;if(a>0){c.sendRequest(a==1?b[0]:b);c.callBuffer=[]}},configureFormRequest:function(e,a,b,i,j){var h=this,c,g,d;c=new Ext.direct.Transaction({provider:h,action:e,method:a.name,args:[b,i,j],callback:j&&Ext.isFunction(i)?Ext.Function.bind(i,j):i,isForm:true});if(h.fireEvent("beforecall",h,c,a)!==false){Ext.direct.Manager.addTransaction(c);g=String(b.getAttribute("enctype")).toLowerCase()=="multipart/form-data";d={extTID:c.id,extAction:e,extMethod:a.name,extType:"rpc",extUpload:String(g)};Ext.apply(c,{form:Ext.getDom(b),isUpload:g,params:i&&Ext.isObject(i.params)?Ext.apply(d,i.params):d});h.fireEvent("call",h,c,a);h.sendFormRequest(c)}},sendFormRequest:function(b){var a=this;Ext.Ajax.request({url:a.url,params:b.params,callback:a.onData,scope:a,form:b.form,isUpload:b.isUpload,transaction:b})}});Ext.define("Ext.dom.Layer",{extend:Ext.Element,alternateClassName:"Ext.Layer",statics:{shims:[]},isLayer:true,localXYNames:{get:"getLocalXY",set:"setLocalXY"},constructor:function(c,b){c=c||{};var d=this,e=Ext.DomHelper,h=c.parentEl,g=h?Ext.getDom(h):document.body,i=c.hideMode,a=Ext.baseCSSPrefix+(c.fixed&&!(Ext.isIE6||Ext.isIEQuirks)?"fixed-layer":"layer");d.el=d;if(b){d.dom=Ext.getDom(b)}if(!d.dom){d.dom=e.append(g,c.dh||{tag:"div",cls:a})}else{d.addCls(a);if(!d.dom.parentNode){g.appendChild(d.dom)}}if(c.id){d.id=d.dom.id=c.id}else{d.id=Ext.id(d.dom)}Ext.Element.addToCache(d);if(c.cls){d.addCls(c.cls)}d.constrain=c.constrain!==false;if(i){d.setVisibilityMode(Ext.Element[i.toUpperCase()]);if(d.visibilityMode==Ext.Element.ASCLASS){d.visibilityCls=c.visibilityCls}}else{if(c.useDisplay){d.setVisibilityMode(Ext.Element.DISPLAY)}else{d.setVisibilityMode(Ext.Element.VISIBILITY)}}if(c.shadow){d.shadowOffset=c.shadowOffset||4;d.shadow=new Ext.Shadow({offset:d.shadowOffset,mode:c.shadow,fixed:c.fixed});d.disableShadow()}else{d.shadowOffset=0}d.useShim=c.shim!==false&&Ext.useShims;if(c.hidden===true){d.hide()}else{d.show()}},getZIndex:function(){return parseInt((this.getShim()||this).getStyle("z-index"),10)},getShim:function(){var b=this,c,a;if(!b.useShim){return null}if(!b.shim){c=b.self.shims.shift();if(!c){c=b.createShim();c.enableDisplayMode("block");c.hide()}a=b.dom.parentNode;if(c.dom.parentNode!=a){a.insertBefore(c.dom,b.dom)}b.shim=c}return b.shim},hideShim:function(){var a=this;if(a.shim){a.shim.setDisplayed(false);a.self.shims.push(a.shim);delete a.shim}},disableShadow:function(){var a=this;if(a.shadow&&!a.shadowDisabled){a.shadowDisabled=true;a.shadow.hide();a.lastShadowOffset=a.shadowOffset;a.shadowOffset=0}},enableShadow:function(a){var b=this;if(b.shadow&&b.shadowDisabled){b.shadowDisabled=false;b.shadowOffset=b.lastShadowOffset;delete b.lastShadowOffset;if(a){b.sync(true)}}},sync:function(b){var i=this,n=i.shadow,g,d,a,c,o,k,j,m,e,l;if(!i.updating&&i.isVisible()&&(n||i.useShim)){c=i.getShim();o=i[i.localXYNames.get]();k=o[0];j=o[1];m=i.dom.offsetWidth;e=i.dom.offsetHeight;if(n&&!i.shadowDisabled){if(b&&!n.isVisible()){n.show(i)}else{n.realign(k,j,m,e)}if(c){l=c.getStyle("z-index");if(l>i.zindex){i.shim.setStyle("z-index",i.zindex-2)}c.show();if(n.isVisible()){g=n.el.getXY();d=c.dom.style;a=n.el.getSize();if(Ext.supports.CSS3BoxShadow){a.height+=6;a.width+=4;g[0]-=2;g[1]-=4}d.left=(g[0])+"px";d.top=(g[1])+"px";d.width=(a.width)+"px";d.height=(a.height)+"px"}else{c.setSize(m,e);c[i.localXYNames.set](k,j)}}}else{if(c){l=c.getStyle("z-index");if(l>i.zindex){i.shim.setStyle("z-index",i.zindex-2)}c.show();c.setSize(m,e);c[i.localXYNames.set](k,j)}}}return i},remove:function(){this.hideUnders();this.callParent()},beginUpdate:function(){this.updating=true},endUpdate:function(){this.updating=false;this.sync(true)},hideUnders:function(){if(this.shadow){this.shadow.hide()}this.hideShim()},constrainXY:function(){if(this.constrain){var g=Ext.Element.getViewWidth(),b=Ext.Element.getViewHeight(),l=Ext.getDoc().getScroll(),k=this.getXY(),i=k[0],e=k[1],a=this.shadowOffset,j=this.dom.offsetWidth+a,c=this.dom.offsetHeight+a,d=false;if((i+j)>g+l.left){i=g-j-a;d=true}if((e+c)>b+l.top){e=b-c-a;d=true}if(i<l.left){i=l.left;d=true}if(e<l.top){e=l.top;d=true}if(d){Ext.Layer.superclass.setXY.call(this,[i,e]);this.sync()}}return this},getConstrainOffset:function(){return this.shadowOffset},setVisible:function(e,b,d,h,g){var c=this,a;a=function(){if(e){c.sync(true)}if(h){h()}};if(!e){c.hideUnders(true)}c.callParent([e,b,d,h,g]);if(!b){a()}return c},beforeFx:function(){this.beforeAction();return this.callParent(arguments)},afterFx:function(){this.callParent(arguments);this.sync(this.isVisible())},beforeAction:function(){if(!this.updating&&this.shadow){this.shadow.hide()}},setLeft:function(a){this.callParent(arguments);return this.sync()},setTop:function(a){this.callParent(arguments);return this.sync()},setLeftTop:function(b,a){this.callParent(arguments);return this.sync()},setLocalX:function(){this.callParent(arguments);return this.sync()},setLocalXY:function(){this.callParent(arguments);return this.sync()},setLocalY:function(){this.callParent(arguments);return this.sync()},setXY:function(d,a,c,g,e){var b=this;g=b.createCB(g);b.fixDisplay();b.beforeAction();b.callParent([d,a,c,g,e]);if(!a){g()}return b},createCB:function(c){var a=this,b=a.shadow&&a.shadow.isVisible();return function(){a.constrainXY();a.sync(b);if(c){c()}}},setX:function(a,b,c,e,d){this.setXY([a,this.getY()],b,c,e,d);return this},setY:function(e,a,b,d,c){this.setXY([this.getX(),e],a,b,d,c);return this},setSize:function(a,c,b,e,i,g){var d=this;i=d.createCB(i);d.beforeAction();d.callParent([a,c,b,e,i,g]);if(!b){i()}return d},setWidth:function(a,b,d,g,e){var c=this;g=c.createCB(g);c.beforeAction();c.callParent([a,b,d,g,e]);if(!b){g()}return c},setHeight:function(b,a,d,g,e){var c=this;g=c.createCB(g);c.beforeAction();c.callParent([b,a,d,g,e]);if(!a){g()}return c},setBounds:function(h,g,a,j,b,c,i,d){var e=this;i=e.createCB(i);e.beforeAction();if(!b){Ext.Layer.superclass.setXY.call(e,[h,g]);Ext.Layer.superclass.setSize.call(e,a,j);i()}else{e.callParent([h,g,a,j,b,c,i,d])}return e},setZIndex:function(a){var b=this;b.zindex=a;if(b.getShim()){b.shim.setStyle("z-index",a++)}if(b.shadow){b.shadow.setZIndex(a++)}return b.setStyle("z-index",a)},onOpacitySet:function(a){var b=this.shadow;if(b){b.setOpacity(a)}}});Ext.define("Ext.draw.Matrix",{constructor:function(h,g,l,k,j,i){if(h!=null){this.matrix=[[h,l,j],[g,k,i],[0,0,1]]}else{this.matrix=[[1,0,0],[0,1,0],[0,0,1]]}},add:function(s,p,m,k,i,h){var n=this,g=[[],[],[]],r=[[s,m,i],[p,k,h],[0,0,1]],q,o,l,j;for(q=0;q<3;q++){for(o=0;o<3;o++){j=0;for(l=0;l<3;l++){j+=n.matrix[q][l]*r[l][o]}g[q][o]=j}}n.matrix=g},prepend:function(s,p,m,k,i,h){var n=this,g=[[],[],[]],r=[[s,m,i],[p,k,h],[0,0,1]],q,o,l,j;for(q=0;q<3;q++){for(o=0;o<3;o++){j=0;for(l=0;l<3;l++){j+=r[q][l]*n.matrix[l][o]}g[q][o]=j}}n.matrix=g},invert:function(){var j=this.matrix,i=j[0][0],h=j[1][0],n=j[0][1],m=j[1][1],l=j[0][2],k=j[1][2],g=i*m-h*n;return new Ext.draw.Matrix(m/g,-h/g,-n/g,i/g,(n*k-m*l)/g,(h*l-i*k)/g)},clone:function(){var i=this.matrix,h=i[0][0],g=i[1][0],m=i[0][1],l=i[1][1],k=i[0][2],j=i[1][2];return new Ext.draw.Matrix(h,g,m,l,k,j)},translate:function(a,b){this.prepend(1,0,0,1,a,b)},scale:function(b,e,a,d){var c=this;if(e==null){e=b}c.add(b,0,0,e,a*(1-b),d*(1-e))},rotate:function(c,b,h){c=Ext.draw.Draw.rad(c);var e=this,g=+Math.cos(c).toFixed(9),d=+Math.sin(c).toFixed(9);e.add(g,d,-d,g,b-g*b+d*h,-(d*b)+h-g*h)},x:function(a,c){var b=this.matrix;return a*b[0][0]+c*b[0][1]+b[0][2]},y:function(a,c){var b=this.matrix;return a*b[1][0]+c*b[1][1]+b[1][2]},get:function(b,a){return +this.matrix[b][a].toFixed(4)},toString:function(){var a=this;return[a.get(0,0),a.get(0,1),a.get(1,0),a.get(1,1),0,0].join()},toSvg:function(){var a=this;return"matrix("+[a.get(0,0),a.get(1,0),a.get(0,1),a.get(1,1),a.get(0,2),a.get(1,2)].join()+")"},toFilter:function(b,a){var c=this;b=b||0;a=a||0;return"progid:DXImageTransform.Microsoft.Matrix(sizingMethod='auto expand', filterType='bilinear', M11="+c.get(0,0)+", M12="+c.get(0,1)+", M21="+c.get(1,0)+", M22="+c.get(1,1)+", Dx="+(c.get(0,2)+b)+", Dy="+(c.get(1,2)+a)+")"},offset:function(){var a=this.matrix;return[(a[0][2]||0).toFixed(4),(a[1][2]||0).toFixed(4)]},split:function(){function d(g){return g[0]*g[0]+g[1]*g[1]}function b(g){var h=Math.sqrt(d(g));g[0]/=h;g[1]/=h}var a=this.matrix,c={translateX:a[0][2],translateY:a[1][2]},e;e=[[a[0][0],a[0][1]],[a[1][1],a[1][1]]];c.scaleX=Math.sqrt(d(e[0]));b(e[0]);c.shear=e[0][0]*e[1][0]+e[0][1]*e[1][1];e[1]=[e[1][0]-e[0][0]*c.shear,e[1][1]-e[0][1]*c.shear];c.scaleY=Math.sqrt(d(e[1]));b(e[1]);c.shear/=c.scaleY;c.rotate=Math.asin(-e[0][1]);c.isSimple=!+c.shear.toFixed(9)&&(c.scaleX.toFixed(9)==c.scaleY.toFixed(9)||!c.rotate);return c}});Ext.define("Ext.draw.SpriteDD",{extend:Ext.dd.DragSource,constructor:function(b,a){var d=this,c=b.el;d.sprite=b;d.el=c;d.dragData={el:c,sprite:b};d.callParent([c,a]);d.sprite.setStyle("cursor","move")},showFrame:Ext.emptyFn,createFrame:Ext.emptyFn,getDragEl:function(a){return this.el},getRegion:function(){var j=this,g=j.el,m,d,c,o,n,s,a,k,h,q,p;p=j.sprite;q=p.getBBox();try{m=Ext.Element.getXY(g)}catch(i){}if(!m){return null}d=m[0];c=d+q.width;o=m[1];n=o+q.height;return new Ext.util.Region(o,c,n,d)},startDrag:function(b,d){var c=this,a=c.sprite.attr;c.prev=c.sprite.surface.transformToViewBox(b,d)},onDrag:function(i){var h=i.getXY(),g=this,d=g.sprite,a=d.attr,c,b;h=g.sprite.surface.transformToViewBox(h[0],h[1]);c=h[0]-g.prev[0];b=h[1]-g.prev[1];d.setAttributes({translate:{x:a.translation.x+c,y:a.translation.y+b}},true);g.prev=h},setDragElPos:function(){return false}});Ext.define("Ext.draw.Sprite",{mixins:{observable:Ext.util.Observable,animate:Ext.util.Animate},dirty:false,dirtyHidden:false,dirtyTransform:false,dirtyPath:true,dirtyFont:true,zIndexDirty:true,isSprite:true,zIndex:0,fontProperties:["font","font-size","font-weight","font-style","font-family","text-anchor","text"],pathProperties:["x","y","d","path","height","width","radius","r","rx","ry","cx","cy"],constructor:function(a){var b=this;a=Ext.merge({},a||{});b.id=Ext.id(null,"ext-sprite-");b.transformations=[];Ext.copyTo(this,a,"surface,group,type,draggable");b.bbox={};b.attr={zIndex:0,translation:{x:null,y:null},rotation:{degrees:null,x:null,y:null},scaling:{x:null,y:null,cx:null,cy:null}};delete a.surface;delete a.group;delete a.type;delete a.draggable;b.setAttributes(a);b.addEvents("beforedestroy","destroy","render","mousedown","mouseup","mouseover","mouseout","mousemove","click");b.mixins.observable.constructor.apply(this,arguments)},initDraggable:function(){var a=this;if(!a.el){a.surface.createSpriteElement(a)}a.dd=new Ext.draw.SpriteDD(a,Ext.isBoolean(a.draggable)?null:a.draggable);a.on("beforedestroy",a.dd.destroy,a.dd)},setAttributes:function(l,o){var t=this,j=t.fontProperties,q=j.length,h=t.pathProperties,g=h.length,r=!!t.surface,a=r&&t.surface.customAttributes||{},c=t.attr,b=false,m,p,k,d,s,n,u,e;l=Ext.apply({},l);for(m in a){if(l.hasOwnProperty(m)&&typeof a[m]=="function"){Ext.apply(l,a[m].apply(t,[].concat(l[m])))}}if(!!l.hidden!==!!c.hidden){t.dirtyHidden=true}for(p=0;p<g;p++){m=h[p];if(m in l&&l[m]!==c[m]){t.dirtyPath=true;b=true;break}}if("zIndex" in l){t.zIndexDirty=true}if("text" in l){t.dirtyFont=true;b=true}for(p=0;p<q;p++){m=j[p];if(m in l&&l[m]!==c[m]){t.dirtyFont=true;b=true;break}}k=l.translation||l.translate;delete l.translate;delete l.translation;d=c.translation;if(k){if(("x" in k&&k.x!==d.x)||("y" in k&&k.y!==d.y)){t.dirtyTransform=true;d.x=k.x;d.y=k.y}}s=l.rotation||l.rotate;n=c.rotation;delete l.rotate;delete l.rotation;if(s){if(("x" in s&&s.x!==n.x)||("y" in s&&s.y!==n.y)||("degrees" in s&&s.degrees!==n.degrees)){t.dirtyTransform=true;n.x=s.x;n.y=s.y;n.degrees=s.degrees}}u=l.scaling||l.scale;e=c.scaling;delete l.scale;delete l.scaling;if(u){if(("x" in u&&u.x!==e.x)||("y" in u&&u.y!==e.y)||("cx" in u&&u.cx!==e.cx)||("cy" in u&&u.cy!==e.cy)){t.dirtyTransform=true;e.x=u.x;e.y=u.y;e.cx=u.cx;e.cy=u.cy}}if(!t.dirtyTransform&&b){if(c.scaling.x===null||c.scaling.y===null||c.rotation.y===null||c.rotation.y===null){t.dirtyTransform=true}}Ext.apply(c,l);t.dirty=true;if(o===true&&r){t.redraw()}return this},getBBox:function(){return this.surface.getBBox(this)},setText:function(a){return this.surface.setText(this,a)},hide:function(a){this.setAttributes({hidden:true},a);return this},show:function(a){this.setAttributes({hidden:false},a);return this},remove:function(){if(this.surface){this.surface.remove(this);return true}return false},onRemove:function(){this.surface.onRemove(this)},destroy:function(){var a=this;if(a.fireEvent("beforedestroy",a)!==false){a.remove();a.surface.onDestroy(a);a.clearListeners();a.fireEvent("destroy")}},redraw:function(){this.surface.renderItem(this);return this},setStyle:function(){this.el.setStyle.apply(this.el,arguments);return this},addCls:function(a){this.surface.addCls(this,a);return this},removeCls:function(a){this.surface.removeCls(this,a);return this}});Ext.define("Ext.draw.Text",{extend:Ext.draw.Component,alias:"widget.text",text:"",focusable:false,viewBox:false,autoSize:true,baseCls:Ext.baseCSSPrefix+"surface "+Ext.baseCSSPrefix+"draw-text",initComponent:function(){var a=this;a.textConfig=Ext.apply({type:"text",text:a.text,rotate:{degrees:a.degrees||0}},a.textStyle);Ext.apply(a.textConfig,a.getStyles(a.styleSelectors||a.styleSelector));a.initialConfig.items=[a.textConfig];a.callParent(arguments)},getStyles:function(d){d=Ext.Array.from(d);var c=0,b=d.length,g,e,h,a={};for(;c<b;c++){g=Ext.util.CSS.getRule(d[c]);if(g){e=g.style;if(e){Ext.apply(a,{"font-family":e.fontFamily,"font-weight":e.fontWeight,"line-height":e.lineHeight,"font-size":e.fontSize,fill:e.color})}}}return a},setAngle:function(d){var c=this,a,b;if(c.rendered){a=c.surface;b=a.items.items[0];c.degrees=d;b.setAttributes({rotate:{degrees:d}},true);if(c.autoSize||c.viewBox){c.updateLayout()}}else{c.degrees=d}},setText:function(d){var c=this,a,b;if(c.rendered){a=c.surface;b=a.items.items[0];c.text=d||"";a.remove(b);c.textConfig.type="text";c.textConfig.text=c.text;b=a.add(c.textConfig);b.setAttributes({rotate:{degrees:c.degrees}},true);if(c.autoSize||c.viewBox){c.updateLayout()}}else{c.on({render:function(){c.setText(d)},single:true})}}});Ext.define("Ext.draw.engine.ImageExporter",{singleton:true,defaultUrl:"http://svg.sencha.io",supportedTypes:["image/png","image/jpeg"],widthParam:"width",heightParam:"height",typeParam:"type",svgParam:"svg",formCls:Ext.baseCSSPrefix+"hide-display",generate:function(a,b){b=b||{};var e=this,c=b.type,d;if(Ext.Array.indexOf(e.supportedTypes,c)===-1){return false}d=Ext.getBody().createChild({tag:"form",method:"POST",action:b.url||e.defaultUrl,cls:e.formCls,children:[{tag:"input",type:"hidden",name:b.widthParam||e.widthParam,value:b.width||a.width},{tag:"input",type:"hidden",name:b.heightParam||e.heightParam,value:b.height||a.height},{tag:"input",type:"hidden",name:b.typeParam||e.typeParam,value:c},{tag:"input",type:"hidden",name:b.svgParam||e.svgParam}]});d.last(null,true).value=Ext.draw.engine.SvgExporter.generate(a);d.dom.submit();d.remove();return true}});Ext.define("Ext.draw.engine.Svg",{extend:Ext.draw.Surface,engine:"Svg",trimRe:/^\s+|\s+$/g,spacesRe:/\s+/,xlink:"http://www.w3.org/1999/xlink",translateAttrs:{radius:"r",radiusX:"rx",radiusY:"ry",path:"d",lineWidth:"stroke-width",fillOpacity:"fill-opacity",strokeOpacity:"stroke-opacity",strokeLinejoin:"stroke-linejoin"},parsers:{},minDefaults:{circle:{cx:0,cy:0,r:0,fill:"none",stroke:null,"stroke-width":null,opacity:null,"fill-opacity":null,"stroke-opacity":null},ellipse:{cx:0,cy:0,rx:0,ry:0,fill:"none",stroke:null,"stroke-width":null,opacity:null,"fill-opacity":null,"stroke-opacity":null},rect:{x:0,y:0,width:0,height:0,rx:0,ry:0,fill:"none",stroke:null,"stroke-width":null,opacity:null,"fill-opacity":null,"stroke-opacity":null},text:{x:0,y:0,"text-anchor":"start","font-family":null,"font-size":null,"font-weight":null,"font-style":null,fill:"#000",stroke:null,"stroke-width":null,opacity:null,"fill-opacity":null,"stroke-opacity":null},path:{d:"M0,0",fill:"none",stroke:null,"stroke-width":null,opacity:null,"fill-opacity":null,"stroke-opacity":null},image:{x:0,y:0,width:0,height:0,preserveAspectRatio:"none",opacity:null}},createSvgElement:function(d,a){var c=this.domRef.createElementNS("http://www.w3.org/2000/svg",d),b;if(a){for(b in a){c.setAttribute(b,String(a[b]))}}return c},createSpriteElement:function(a){var b=this.createSvgElement(a.type);b.id=a.id;if(b.style){b.style.webkitTapHighlightColor="rgba(0,0,0,0)"}a.el=Ext.get(b);this.applyZIndex(a);a.matrix=new Ext.draw.Matrix();a.bbox={plain:0,transform:0};this.applyAttrs(a);this.applyTransformations(a);a.fireEvent("render",a);return b},getBBoxText:function(j){var k={},g,l,a,c,h,b;if(j&&j.el){b=j.el.dom;try{k=b.getBBox();return k}catch(d){}k={x:k.x,y:Infinity,width:0,height:0};h=b.getNumberOfChars();for(c=0;c<h;c++){g=b.getExtentOfChar(c);k.y=Math.min(g.y,k.y);l=g.y+g.height-k.y;k.height=Math.max(k.height,l);a=g.x+g.width-k.x;k.width=Math.max(k.width,a)}return k}},hide:function(){Ext.get(this.el).hide()},show:function(){Ext.get(this.el).show()},hidePrim:function(a){this.addCls(a,Ext.baseCSSPrefix+"hide-visibility")},showPrim:function(a){this.removeCls(a,Ext.baseCSSPrefix+"hide-visibility")},getDefs:function(){return this._defs||(this._defs=this.createSvgElement("defs"))},transform:function(k,a){var h=this,j=new Ext.draw.Matrix(),e=k.transformations,d=e.length,c=0,b,g;for(;c<d;c++){b=e[c];g=b.type;if(g=="translate"){j.translate(b.x,b.y)}else{if(g=="rotate"){j.rotate(b.degrees,b.x,b.y)}else{if(g=="scale"){j.scale(b.x,b.y,b.centerX,b.centerY)}}}}k.matrix=j;if(!a){k.el.set({transform:j.toSvg()})}},setSize:function(c,a){var d=this,b=d.el;c=+c||d.width;a=+a||d.height;d.width=c;d.height=a;b.setSize(c,a);b.set({width:c,height:a});d.callParent([c,a])},getRegion:function(){var e=this.el.getXY(),c=this.bgRect.getXY(),b=Math.max,a=b(e[0],c[0]),d=b(e[1],c[1]);return{left:a,top:d,right:a+this.width,bottom:d+this.height}},onRemove:function(a){if(a.el){a.el.destroy();delete a.el}this.callParent(arguments)},setViewBox:function(b,d,c,a){if(isFinite(b)&&isFinite(d)&&isFinite(c)&&isFinite(a)){this.callParent(arguments);this.el.dom.setAttribute("viewBox",[b,d,c,a].join(" "))}},render:function(c){var g=this,e,b,d,a,h,i;if(!g.el){e=g.width||0;b=g.height||0;d=g.createSvgElement("svg",{xmlns:"http://www.w3.org/2000/svg",version:1.1,width:e,height:b});a=g.getDefs();h=g.createSvgElement("rect",{width:"100%",height:"100%",fill:"#000",stroke:"none",opacity:0});if(Ext.isSafari3){i=g.createSvgElement("rect",{x:-10,y:-10,width:"110%",height:"110%",fill:"none",stroke:"#000"})}d.appendChild(a);if(Ext.isSafari3){d.appendChild(i)}d.appendChild(h);c.appendChild(d);g.el=Ext.get(d);g.bgRect=Ext.get(h);if(Ext.isSafari3){g.webkitRect=Ext.get(i);g.webkitRect.hide()}g.el.on({scope:g,mouseup:g.onMouseUp,mousedown:g.onMouseDown,mouseover:g.onMouseOver,mouseout:g.onMouseOut,mousemove:g.onMouseMove,mouseenter:g.onMouseEnter,mouseleave:g.onMouseLeave,click:g.onClick,dblclick:g.onDblClick})}g.renderAll()},onMouseEnter:function(a){if(this.el.parent().getRegion().contains(a.getPoint())){this.fireEvent("mouseenter",a)}},onMouseLeave:function(a){if(!this.el.parent().getRegion().contains(a.getPoint())){this.fireEvent("mouseleave",a)}},processEvent:function(b,g){var d=g.getTarget(),a=this.surface,c;this.fireEvent(b,g);if(d.nodeName=="tspan"&&d.parentNode){d=d.parentNode}c=this.items.get(d.id);if(c){c.fireEvent(b,c,g)}},tuneText:function(k,l){var a=k.el.dom,b=[],n,h,m,d,e,c,g,j;if(l.hasOwnProperty("text")){m=k.tspans&&Ext.Array.map(k.tspans,function(i){return i.textContent}).join("");if(!k.tspans||l.text!=m){b=this.setText(k,l.text);k.tspans=b}else{b=k.tspans||[]}}if(b.length){n=this.getBBoxText(k).height;j=k.el.dom.getAttribute("x");for(d=0,e=b.length;d<e;d++){g=(Ext.isFF3_0||Ext.isFF3_5)?2:4;b[d].setAttribute("x",j);b[d].setAttribute("dy",d?n*1.2:n/g)}k.dirty=true}},setText:function(k,d){var h=this,a=k.el.dom,b=[],m,j,l,e,g,c;while(a.firstChild){a.removeChild(a.firstChild)}c=String(d).split("\n");for(e=0,g=c.length;e<g;e++){l=c[e];if(l){j=h.createSvgElement("tspan");j.appendChild(document.createTextNode(Ext.htmlDecode(l)));a.appendChild(j);b[e]=j}}return b},renderAll:function(){this.items.each(this.renderItem,this)},renderItem:function(a){if(!this.el){return}if(!a.el){this.createSpriteElement(a)}if(a.zIndexDirty){this.applyZIndex(a)}if(a.dirty){this.applyAttrs(a);if(a.dirtyTransform){this.applyTransformations(a)}}},redraw:function(a){a.dirty=a.zIndexDirty=true;this.renderItem(a)},applyAttrs:function(r){var m=this,c=r.el,q=r.group,j=r.attr,s=m.parsers,g=m.gradientsMap||{},k=Ext.isSafari&&!Ext.isStrict,e,h,l,p,d,o,b,a,n;if(q){e=[].concat(q);l=e.length;for(h=0;h<l;h++){q=e[h];m.getGroup(q).add(r)}delete r.group}p=m.scrubAttrs(r)||{};r.bbox.plain=0;r.bbox.transform=0;if(r.type=="circle"||r.type=="ellipse"){p.cx=p.cx||p.x;p.cy=p.cy||p.y}else{if(r.type=="rect"){p.rx=p.ry=p.r}else{if(r.type=="path"&&p.d){p.d=Ext.draw.Draw.pathToString(Ext.draw.Draw.pathToAbsolute(p.d))}}}r.dirtyPath=false;if(p["clip-rect"]){m.setClip(r,p);delete p["clip-rect"]}if(r.type=="text"&&p.font&&r.dirtyFont){c.set({style:"font: "+p.font})}if(r.type=="image"){c.dom.setAttributeNS(m.xlink,"href",p.src)}Ext.applyIf(p,m.minDefaults[r.type]);if(r.dirtyHidden){(j.hidden)?m.hidePrim(r):m.showPrim(r);r.dirtyHidden=false}for(o in p){if(p.hasOwnProperty(o)&&p[o]!=null){if(k&&("color|stroke|fill".indexOf(o)>-1)&&(p[o] in g)){p[o]=g[p[o]]}if(o=="hidden"&&r.type=="text"){continue}if(o in s){c.dom.setAttribute(o,s[o](p[o],r,m))}else{c.dom.setAttribute(o,p[o])}}}if(r.type=="text"){m.tuneText(r,p)}r.dirtyFont=false;b=j.style;if(b){c.setStyle(b)}r.dirty=false;if(Ext.isSafari3){m.webkitRect.show();setTimeout(function(){m.webkitRect.hide()})}},setClip:function(b,g){var e=this,d=g["clip-rect"],a,c;if(d){if(b.clip){b.clip.parentNode.parentNode.removeChild(b.clip.parentNode)}a=e.createSvgElement("clipPath");c=e.createSvgElement("rect");a.id=Ext.id(null,"ext-clip-");c.setAttribute("x",d.x);c.setAttribute("y",d.y);c.setAttribute("width",d.width);c.setAttribute("height",d.height);a.appendChild(c);e.getDefs().appendChild(a);b.el.dom.setAttribute("clip-path","url(#"+a.id+")");b.clip=c}},applyZIndex:function(d){var g=this,b=g.items,a=b.indexOf(d),e=d.el,c;if(g.el.dom.childNodes[a+2]!==e.dom){if(a>0){do{c=b.getAt(--a).el}while(!c&&a>0)}e.insertAfter(c||g.bgRect)}d.zIndexDirty=false},createItem:function(a){var b=new Ext.draw.Sprite(a);b.surface=this;return b},addGradient:function(h){h=Ext.draw.Draw.parseGradient(h);var e=this,d=h.stops.length,a=h.vector,l=Ext.isSafari&&!Ext.isStrict,j,g,k,c,b;b=e.gradientsMap||{};if(!l){if(h.type=="linear"){j=e.createSvgElement("linearGradient");j.setAttribute("x1",a[0]);j.setAttribute("y1",a[1]);j.setAttribute("x2",a[2]);j.setAttribute("y2",a[3])}else{j=e.createSvgElement("radialGradient");j.setAttribute("cx",h.centerX);j.setAttribute("cy",h.centerY);j.setAttribute("r",h.radius);if(Ext.isNumber(h.focalX)&&Ext.isNumber(h.focalY)){j.setAttribute("fx",h.focalX);j.setAttribute("fy",h.focalY)}}j.id=h.id;e.getDefs().appendChild(j);for(c=0;c<d;c++){g=h.stops[c];k=e.createSvgElement("stop");k.setAttribute("offset",g.offset+"%");k.setAttribute("stop-color",g.color);k.setAttribute("stop-opacity",g.opacity);j.appendChild(k)}}else{b["url(#"+h.id+")"]=h.stops[0].color}e.gradientsMap=b},hasCls:function(a,b){return b&&(" "+(a.el.dom.getAttribute("class")||"")+" ").indexOf(" "+b+" ")!=-1},addCls:function(e,h){var g=e.el,d,a,c,b=[],j=g.getAttribute("class")||"";if(!Ext.isArray(h)){if(typeof h=="string"&&!this.hasCls(e,h)){g.set({"class":j+" "+h})}}else{for(d=0,a=h.length;d<a;d++){c=h[d];if(typeof c=="string"&&(" "+j+" ").indexOf(" "+c+" ")==-1){b.push(c)}}if(b.length){g.set({"class":" "+b.join(" ")})}}},removeCls:function(k,g){var h=this,b=k.el,d=b.getAttribute("class")||"",c,j,e,l,a;if(!Ext.isArray(g)){g=[g]}if(d){a=d.replace(h.trimRe," ").split(h.spacesRe);for(c=0,e=g.length;c<e;c++){l=g[c];if(typeof l=="string"){l=l.replace(h.trimRe,"");j=Ext.Array.indexOf(a,l);if(j!=-1){Ext.Array.erase(a,j,1)}}}b.set({"class":a.join(" ")})}},destroy:function(){var a=this;a.callParent();if(a.el){a.el.remove()}if(a._defs){Ext.get(a._defs).destroy()}if(a.bgRect){Ext.get(a.bgRect).destroy()}if(a.webkitRect){Ext.get(a.webkitRect).destroy()}delete a.el}});Ext.define("Ext.draw.engine.SvgExporter",function(){var b=/,/g,c=/(-?\d*\.?\d*){1}(em|ex|px|in|cm|mm|pt|pc|%)\s('*.*'*)/,j=/rgb\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\)/g,h=/rgba\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*,([\d\.]+)\)/g,g,i,e,m,n=function(o){g=o;i=g.length;e=g.width;m=g.height},k={path:function(s){var o=s.attr,v=o.path,r="",t,u,q;if(Ext.isArray(v[0])){q=v.length;for(u=0;u<q;u++){r+=v[u].join(" ")}}else{if(Ext.isArray(v)){r=v.join(" ")}else{r=v.replace(b," ")}}t=d({d:r,fill:o.fill||"none",stroke:o.stroke,"fill-opacity":o.opacity,"stroke-width":o["stroke-width"],"stroke-opacity":o["stroke-opacity"],"z-index":o.zIndex,transform:s.matrix.toSvg()});return"<path "+t+"/>"},text:function(u){var r=u.attr,q=c.exec(r.font),w=(q&&q[1])||"12",p=(q&&q[3])||"Arial",v=r.text,t=(Ext.isFF3_0||Ext.isFF3_5)?2:4,o="",s;u.getBBox();o+='<tspan x="'+(r.x||"")+'" dy="';o+=(w/t)+'">';o+=Ext.htmlEncode(v)+"</tspan>";s=d({x:r.x,y:r.y,"font-size":w,"font-family":p,"font-weight":r["font-weight"],"text-anchor":r["text-anchor"],fill:r.fill||"#000","fill-opacity":r.opacity,transform:u.matrix.toSvg()});return"<text "+s+">"+o+"</text>"},rect:function(p){var o=p.attr,q=d({x:o.x,y:o.y,rx:o.rx,ry:o.ry,width:o.width,height:o.height,fill:o.fill||"none","fill-opacity":o.opacity,stroke:o.stroke,"stroke-opacity":o["stroke-opacity"],"stroke-width":o["stroke-width"],transform:p.matrix&&p.matrix.toSvg()});return"<rect "+q+"/>"},circle:function(p){var o=p.attr,q=d({cx:o.x,cy:o.y,r:o.radius,fill:o.translation.fill||o.fill||"none","fill-opacity":o.opacity,stroke:o.stroke,"stroke-opacity":o["stroke-opacity"],"stroke-width":o["stroke-width"],transform:p.matrix.toSvg()});return"<circle "+q+" />"},image:function(p){var o=p.attr,q=d({x:o.x-(o.width/2>>0),y:o.y-(o.height/2>>0),width:o.width,height:o.height,"xlink:href":o.src,transform:p.matrix.toSvg()});return"<image "+q+" />"}},a=function(){var o='<?xml version="1.0" standalone="yes"?>';o+='<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">';return o},l=function(){var w='<svg width="'+e+'px" height="'+m+'px" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1">',p="",H,F,v,q,G,J,z,x,t,y,B,o,K,u,E,C,I,D,s,r;v=g.items.items;F=v.length;G=function(O){var V=O.childNodes,S=V.length,R=0,P,Q,L="",M,U,N,T;for(;R<S;R++){M=V[R];U=M.attributes;N=M.tagName;L+="<"+N;for(Q=0,P=U.length;Q<P;Q++){T=U.item(Q);L+=" "+T.name+'="'+T.value+'"'}L+=">";if(M.childNodes.length>0){L+=G(M)}L+="</"+N+">"}return L};if(g.getDefs){p=G(g.getDefs())}else{x=g.gradientsColl;if(x){t=x.keys;y=x.items;B=0;o=t.length}for(;B<o;B++){K=t[B];u=y[B];q=g.gradientsColl.getByKey(K);p+='<linearGradient id="'+K+'" x1="0" y1="0" x2="1" y2="1">';var A=q.colors.replace(j,"rgb($1|$2|$3)");A=A.replace(h,"rgba($1|$2|$3|$4)");J=A.split(",");for(E=0,I=J.length;E<I;E++){z=J[E].split(" ");A=Ext.draw.Color.fromString(z[1].replace(/\|/g,","));p+='<stop offset="'+z[0]+'" stop-color="'+A.toString()+'" stop-opacity="1"></stop>'}p+="</linearGradient>"}}w+="<defs>"+p+"</defs>";w+=k.rect({attr:{width:"100%",height:"100%",fill:"#fff",stroke:"none",opacity:"0"}});D=new Array(F);for(E=0;E<F;E++){D[E]=E}D.sort(function(M,L){s=v[M].attr.zIndex||0;r=v[L].attr.zIndex||0;if(s==r){return M-L}return s-r});for(E=0;E<F;E++){H=v[D[E]];if(!H.attr.hidden){w+=k[H.type](H)}}w+="</svg>";return w},d=function(q){var p="",o;for(o in q){if(q.hasOwnProperty(o)&&q[o]!=null){p+=o+'="'+q[o]+'" '}}return p};return{singleton:true,generate:function(o,p){p=p||{};n(o);return a()+l()}}});Ext.define("Ext.draw.engine.Vml",{extend:Ext.draw.Surface,engine:"Vml",map:{M:"m",L:"l",C:"c",Z:"x",m:"t",l:"r",c:"v",z:"x"},bitesRe:/([clmz]),?([^clmz]*)/gi,valRe:/-?[^,\s\-]+/g,fillUrlRe:/^url\(\s*['"]?([^\)]+?)['"]?\s*\)$/i,pathlike:/^(path|rect)$/,NonVmlPathRe:/[ahqstv]/ig,partialPathRe:/[clmz]/g,fontFamilyRe:/^['"]+|['"]+$/g,baseVmlCls:Ext.baseCSSPrefix+"vml-base",vmlGroupCls:Ext.baseCSSPrefix+"vml-group",spriteCls:Ext.baseCSSPrefix+"vml-sprite",measureSpanCls:Ext.baseCSSPrefix+"vml-measure-span",zoom:21600,coordsize:1000,coordorigin:"0 0",zIndexShift:0,orderSpritesByZIndex:false,path2vml:function(t){var n=this,u=n.NonVmlPathRe,b=n.map,e=n.valRe,s=n.zoom,d=n.bitesRe,g=Ext.Function.bind(Ext.draw.Draw.pathToAbsolute,Ext.draw.Draw),m,o,c,a,k,q,h,l;if(String(t).match(u)){g=Ext.Function.bind(Ext.draw.Draw.path2curve,Ext.draw.Draw)}else{if(!String(t).match(n.partialPathRe)){m=String(t).replace(d,function(r,w,j){var v=[],i=w.toLowerCase()=="m",p=b[w];j.replace(e,function(x){if(i&&v.length===2){p+=v+b[w=="m"?"l":"L"];v=[]}v.push(Math.round(x*s))});return p+v});return m}}o=g(t);m=[];for(k=0,q=o.length;k<q;k++){c=o[k];a=o[k][0].toLowerCase();if(a=="z"){a="x"}for(h=1,l=c.length;h<l;h++){a+=Math.round(c[h]*n.zoom)+(h!=l-1?",":"")}m.push(a)}return m.join(" ")},translateAttrs:{radius:"r",radiusX:"rx",radiusY:"ry",lineWidth:"stroke-width",fillOpacity:"fill-opacity",strokeOpacity:"stroke-opacity",strokeLinejoin:"stroke-linejoin"},minDefaults:{circle:{fill:"none",stroke:null,"stroke-width":null,opacity:null,"fill-opacity":null,"stroke-opacity":null},ellipse:{cx:0,cy:0,rx:0,ry:0,fill:"none",stroke:null,"stroke-width":null,opacity:null,"fill-opacity":null,"stroke-opacity":null},rect:{x:0,y:0,width:0,height:0,rx:0,ry:0,fill:"none",stroke:null,"stroke-width":null,opacity:null,"fill-opacity":null,"stroke-opacity":null},text:{x:0,y:0,"text-anchor":"start",font:'10px "Arial"',fill:"#000",stroke:null,"stroke-width":null,opacity:null,"fill-opacity":null,"stroke-opacity":null},path:{d:"M0,0",fill:"none",stroke:null,"stroke-width":null,opacity:null,"fill-opacity":null,"stroke-opacity":null},image:{x:0,y:0,width:0,height:0,preserveAspectRatio:"none",opacity:null}},onMouseEnter:function(a){this.fireEvent("mouseenter",a)},onMouseLeave:function(a){this.fireEvent("mouseleave",a)},processEvent:function(b,g){var d=g.getTarget(),a=this.surface,c;this.fireEvent(b,g);c=this.items.get(d.id);if(c){c.fireEvent(b,c,g)}},createSpriteElement:function(h){var e=this,d=h.attr,g=h.type,j=e.zoom,b=h.vml||(h.vml={}),k=Math.round,c=(g==="image")?e.createNode("image"):e.createNode("shape"),l,i,a;c.coordsize=j+" "+j;c.coordorigin=d.coordorigin||"0 0";Ext.get(c).addCls(e.spriteCls);if(g=="text"){b.path=l=e.createNode("path");l.textpathok=true;b.textpath=a=e.createNode("textpath");a.on=true;c.appendChild(a);c.appendChild(l)}c.id=h.id;h.el=Ext.get(c);h.el.setStyle("zIndex",-e.zIndexShift);e.el.appendChild(c);if(g!=="image"){i=e.createNode("skew");i.on=true;c.appendChild(i);h.skew=i}h.matrix=new Ext.draw.Matrix();h.bbox={plain:null,transform:null};this.applyAttrs(h);this.applyTransformations(h);h.fireEvent("render",h);return h.el},getBBoxText:function(b){var a=b.vml;return{x:a.X+(a.bbx||0)-a.W/2,y:a.Y-a.H/2,width:a.W,height:a.H}},applyAttrs:function(m){var s=this,c=m.vml,j=m.group,a=m.attr,b=m.el,o=b.dom,p,u,r,n,k,q,l,t,e,d,h,g;if(j){r=[].concat(j);k=r.length;for(n=0;n<k;n++){j=r[n];s.getGroup(j).add(m)}delete m.group}q=s.scrubAttrs(m)||{};if(m.zIndexDirty){s.setZIndex(m)}Ext.applyIf(q,s.minDefaults[m.type]);if(m.type=="image"){Ext.apply(m.attr,{x:q.x,y:q.y,width:q.width,height:q.height});b.setStyle({width:q.width+"px",height:q.height+"px"});o.src=q.src}if(o.href){o.href=q.href}if(o.title){o.title=q.title}if(o.target){o.target=q.target}if(o.cursor){o.cursor=q.cursor}if(m.dirtyHidden){(q.hidden)?s.hidePrim(m):s.showPrim(m);m.dirtyHidden=false}if(m.dirtyPath){if(m.type=="circle"||m.type=="ellipse"){e=q.x;d=q.y;h=q.rx||q.r||0;g=q.ry||q.r||0;o.path=Ext.String.format("ar{0},{1},{2},{3},{4},{1},{4},{1}",Math.round((e-h)*s.zoom),Math.round((d-g)*s.zoom),Math.round((e+h)*s.zoom),Math.round((d+g)*s.zoom),Math.round(e*s.zoom));m.dirtyPath=false}else{if(m.type!=="text"&&m.type!=="image"){m.attr.path=q.path=s.setPaths(m,q)||q.path;o.path=s.path2vml(q.path);m.dirtyPath=false}}}if("clip-rect" in q){s.setClip(m,q)}if(m.type=="text"){s.setTextAttributes(m,q)}if(q.opacity||q["stroke-opacity"]||q.fill){s.setFill(m,q)}if(q.stroke||q["stroke-opacity"]||q.fill){s.setStroke(m,q)}p=a.style;if(p){b.setStyle(p)}m.dirty=false},setZIndex:function(e){var h=this,j=e.attr.zIndex,b=h.zIndexShift,c,a,g,d;if(j<b){c=h.items.items;a=c.length;for(d=0;d<a;d++){if((j=c[d].attr.zIndex)&&j<b){b=j}}h.zIndexShift=b;for(d=0;d<a;d++){g=c[d];if(g.el){g.el.setStyle("zIndex",g.attr.zIndex-b)}g.zIndexDirty=false}}else{if(e.el){e.el.setStyle("zIndex",j-b);e.zIndexDirty=false}}},setPaths:function(c,d){var a=c.attr,b=c.attr["stroke-width"]||1;c.bbox.plain=null;c.bbox.transform=null;if(c.type=="circle"){a.rx=a.ry=d.r;return Ext.draw.Draw.ellipsePath(c)}else{if(c.type=="ellipse"){a.rx=d.rx;a.ry=d.ry;return Ext.draw.Draw.ellipsePath(c)}else{if(c.type=="rect"){a.rx=a.ry=d.r;return Ext.draw.Draw.rectPath(c)}else{if(c.type=="path"&&a.path){return Ext.draw.Draw.pathToAbsolute(a.path)}}}}return false},setFill:function(k,e){var h=this,c=k.el.dom,j=c.fill,b=false,g,i,a,l,d;if(!j){j=c.fill=h.createNode("fill");b=true}if(Ext.isArray(e.fill)){e.fill=e.fill[0]}if(e.fill=="none"){j.on=false}else{if(typeof e.opacity=="number"){j.opacity=e.opacity}if(typeof e["fill-opacity"]=="number"){j.opacity=e["fill-opacity"]}j.on=true;if(typeof e.fill=="string"){a=e.fill.match(h.fillUrlRe);if(a){a=a[1];if(a.charAt(0)=="#"){i=h.gradientsColl.getByKey(a.substring(1))}if(i){l=e.rotation;d=-(i.angle+270+(l?l.degrees:0))%360;if(d===0){d=180}j.angle=d;j.type="gradient";j.method="sigma";if(j.colors){j.colors.value=i.colors}else{j.colors=i.colors}}else{j.src=a;j.type="tile"}}else{j.color=Ext.draw.Color.toHex(e.fill);j.src="";j.type="solid"}}}if(b){c.appendChild(j)}},setStroke:function(b,h){var e=this,d=b.el.dom,i=b.strokeEl,g=false,c,a;if(!i){i=b.strokeEl=e.createNode("stroke");g=true}if(Ext.isArray(h.stroke)){h.stroke=h.stroke[0]}if(!h.stroke||h.stroke=="none"||h.stroke==0||h["stroke-width"]==0){i.on=false}else{i.on=true;if(h.stroke&&!h.stroke.match(e.fillUrlRe)){i.color=Ext.draw.Color.toHex(h.stroke)}i.dashstyle=h["stroke-dasharray"]?"dash":"solid";i.joinstyle=h["stroke-linejoin"];i.endcap=h["stroke-linecap"]||"round";i.miterlimit=h["stroke-miterlimit"]||8;c=parseFloat(h["stroke-width"]||1)*0.75;a=h["stroke-opacity"]||1;if(Ext.isNumber(c)&&c<1){i.weight=1;i.opacity=a*c}else{i.weight=c;i.opacity=a}}if(g){d.appendChild(i)}},setClip:function(b,g){var e=this,c=b.el,a=b.clipEl,d=String(g["clip-rect"]).split(e.separatorRe);if(!a){a=b.clipEl=e.el.insertFirst(Ext.getDoc().dom.createElement("div"));a.addCls(Ext.baseCSSPrefix+"vml-sprite")}if(d.length==4){d[2]=+d[2]+(+d[0]);d[3]=+d[3]+(+d[1]);a.setStyle("clip",Ext.String.format("rect({1}px {2}px {3}px {0}px)",d[0],d[1],d[2],d[3]));a.setSize(e.el.width,e.el.height)}else{a.setStyle("clip","")}},setTextAttributes:function(i,c){var h=this,a=i.vml,e=a.textpath.style,g=h.span.style,j=h.zoom,k=Math.round,l={fontSize:"font-size",fontWeight:"font-weight",fontStyle:"font-style"},b,d;if(i.dirtyFont){if(c.font){e.font=g.font=c.font}if(c["font-family"]){e.fontFamily='"'+c["font-family"].split(",")[0].replace(h.fontFamilyRe,"")+'"';g.fontFamily=c["font-family"]}for(b in l){d=c[l[b]];if(d){e[b]=g[b]=d}}h.setText(i,c.text);if(a.textpath.string){h.span.innerHTML=String(a.textpath.string).replace(/</g,"&#60;").replace(/&/g,"&#38;").replace(/\n/g,"<br/>")}a.W=h.span.offsetWidth;a.H=h.span.offsetHeight+2;if(c["text-anchor"]=="middle"){e["v-text-align"]="center"}else{if(c["text-anchor"]=="end"){e["v-text-align"]="right";a.bbx=-Math.round(a.W/2)}else{e["v-text-align"]="left";a.bbx=Math.round(a.W/2)}}}a.X=c.x;a.Y=c.y;a.path.v=Ext.String.format("m{0},{1}l{2},{1}",Math.round(a.X*j),Math.round(a.Y*j),Math.round(a.X*j)+1);i.bbox.plain=null;i.bbox.transform=null;i.dirtyFont=false},setText:function(a,b){a.vml.textpath.string=Ext.htmlDecode(b)},hide:function(){this.el.hide()},show:function(){this.el.show()},hidePrim:function(a){a.el.addCls(Ext.baseCSSPrefix+"hide-visibility")},showPrim:function(a){a.el.removeCls(Ext.baseCSSPrefix+"hide-visibility")},setSize:function(b,a){var c=this;b=b||c.width;a=a||c.height;c.width=b;c.height=a;if(c.el){if(b!=undefined){c.el.setWidth(b)}if(a!=undefined){c.el.setHeight(a)}}c.callParent(arguments)},applyViewBox:function(){var g=this,h=g.viewBox,e=g.width,b=g.height,c,a,d;g.callParent();if(h&&(e||b)){c=g.items.items;a=c.length;for(d=0;d<a;d++){g.applyTransformations(c[d])}}},onAdd:function(a){this.callParent(arguments);if(this.el){this.renderItem(a)}},onRemove:function(a){if(a.el){a.el.remove();delete a.el}this.callParent(arguments)},render:function(a){var c=this,g=Ext.getDoc().dom,b;if(!c.createNode){try{if(!g.namespaces.rvml){g.namespaces.add("rvml","urn:schemas-microsoft-com:vml")}c.createNode=function(e){return g.createElement("<rvml:"+e+' class="rvml">')}}catch(d){c.createNode=function(e){return g.createElement("<"+e+' xmlns="urn:schemas-microsoft.com:vml" class="rvml">')}}}if(!c.el){b=g.createElement("div");c.el=Ext.get(b);c.el.addCls(c.baseVmlCls);c.span=g.createElement("span");Ext.get(c.span).addCls(c.measureSpanCls);b.appendChild(c.span);c.el.setSize(c.width||0,c.height||0);a.appendChild(b);c.el.on({scope:c,mouseup:c.onMouseUp,mousedown:c.onMouseDown,mouseover:c.onMouseOver,mouseout:c.onMouseOut,mousemove:c.onMouseMove,mouseenter:c.onMouseEnter,mouseleave:c.onMouseLeave,click:c.onClick,dblclick:c.onDblClick})}c.renderAll()},renderAll:function(){this.items.each(this.renderItem,this)},redraw:function(a){a.dirty=true;this.renderItem(a)},renderItem:function(a){if(!this.el){return}if(!a.el){this.createSpriteElement(a)}if(a.dirty){this.applyAttrs(a);if(a.dirtyTransform){this.applyTransformations(a)}}},rotationCompensation:function(d,c,a){var b=new Ext.draw.Matrix();b.rotate(-d,0.5,0.5);return{x:b.x(c,a),y:b.y(c,a)}},transform:function(x,I){var H=this,b=H.getBBox(x,true),j=b.x+b.width*0.5,h=b.y+b.height*0.5,B=new Ext.draw.Matrix(),q=x.transformations,v=q.length,C=0,o=0,d=1,c=1,n="",g=x.el,E=g.dom,z=E.style,a=H.zoom,k=x.skew,D=H.viewBoxShift,G,F,s,l,r,p,A,w,u,t,e,m;for(;C<v;C++){s=q[C];l=s.type;if(l=="translate"){B.translate(s.x,s.y)}else{if(l=="rotate"){B.rotate(s.degrees,s.x,s.y);o+=s.degrees}else{if(l=="scale"){B.scale(s.x,s.y,s.centerX,s.centerY);d*=s.x;c*=s.y}}}}x.matrix=B.clone();if(I){return}if(D){B.prepend(D.scale,0,0,D.scale,D.dx*D.scale,D.dy*D.scale)}if(x.type!="image"&&k){k.origin="0,0";k.matrix=B.toString();m=B.offset();if(m[0]>32767){m[0]=32767}else{if(m[0]<-32768){m[0]=-32768}}if(m[1]>32767){m[1]=32767}else{if(m[1]<-32768){m[1]=-32768}}k.offset=m}else{z.filter=B.toFilter();z.left=Math.min(B.x(b.x,b.y),B.x(b.x+b.width,b.y),B.x(b.x,b.y+b.height),B.x(b.x+b.width,b.y+b.height))+"px";z.top=Math.min(B.y(b.x,b.y),B.y(b.x+b.width,b.y),B.y(b.x,b.y+b.height),B.y(b.x+b.width,b.y+b.height))+"px"}},createItem:function(a){return Ext.create("Ext.draw.Sprite",a)},getRegion:function(){return this.el.getRegion()},addCls:function(a,b){if(a&&a.el){a.el.addCls(b)}},removeCls:function(a,b){if(a&&a.el){a.el.removeCls(b)}},addGradient:function(g){var d=this.gradientsColl||(this.gradientsColl=Ext.create("Ext.util.MixedCollection")),a=[],j=Ext.create("Ext.util.MixedCollection"),l,e,b,h,k,c;j.addAll(g.stops);j.sortByKey("ASC",function(m,i){m=parseInt(m,10);i=parseInt(i,10);return m>i?1:(m<i?-1:0)});l=j.keys;e=j.items;b=l.length;for(c=0;c<b;c++){h=l[c];k=e[c];a.push(h+"% "+k.color)}d.add(g.id,{colors:a.join(","),angle:g.angle})},destroy:function(){var a=this;a.callParent(arguments);if(a.el){a.el.remove()}delete a.el}});Ext.define("Ext.flash.Component",{extend:Ext.Component,alternateClassName:"Ext.FlashComponent",alias:"widget.flash",flashVersion:"9.0.115",backgroundColor:"#ffffff",wmode:"opaque",swfWidth:"100%",swfHeight:"100%",expressInstall:false,renderTpl:['<div id="{swfId}"></div>'],initComponent:function(){this.callParent();this.addEvents("success","failure")},beforeRender:function(){this.callParent();Ext.applyIf(this.renderData,{swfId:this.getSwfId()})},afterRender:function(){var b=this,a=Ext.apply({},b.flashParams),c=Ext.apply({},b.flashVars);b.callParent();a=Ext.apply({allowScriptAccess:"always",bgcolor:b.backgroundColor,wmode:b.wmode},a);c=Ext.apply({allowedDomain:document.location.hostname},c);new swfobject.embedSWF(b.url,b.getSwfId(),b.swfWidth,b.swfHeight,b.flashVersion,b.expressInstall?b.statics.EXPRESS_INSTALL_URL:undefined,c,a,b.flashAttributes,Ext.bind(b.swfCallback,b))},swfCallback:function(b){var a=this;if(b.success){a.swf=Ext.get(b.ref);a.onSuccess();a.fireEvent("success",a)}else{a.onFailure();a.fireEvent("failure",a)}},getSwfId:function(){return this.swfId||(this.swfId="extswf"+this.getAutoId())},onSuccess:function(){this.swf.setStyle("visibility","inherit")},onFailure:Ext.emptyFn,beforeDestroy:function(){var b=this,a=b.swf;if(a){swfobject.removeSWF(b.getSwfId());Ext.destroy(a);delete b.swf}b.callParent()},statics:{EXPRESS_INSTALL_URL:"http://swfobject.googlecode.com/svn/trunk/swfobject/expressInstall.swf"}});Ext.define("Ext.form.action.Action",{alternateClassName:"Ext.form.Action",submitEmptyText:true,constructor:function(a){if(a){Ext.apply(this,a)}var b=a.params;if(Ext.isString(b)){this.params=Ext.Object.fromQueryString(b)}},run:Ext.emptyFn,onFailure:function(a){this.response=a;this.failureType=Ext.form.action.Action.CONNECT_FAILURE;this.form.afterAction(this,false)},processResponse:function(a){this.response=a;if(!a.responseText&&!a.responseXML){return true}return(this.result=this.handleResponse(a))},getUrl:function(){return this.url||this.form.url},getMethod:function(){return(this.method||this.form.method||"POST").toUpperCase()},getParams:function(){return Ext.apply({},this.params,this.form.baseParams)},createCallback:function(){var c=this,a,b=c.form;return{success:c.onSuccess,failure:c.onFailure,scope:c,timeout:(this.timeout*1000)||(b.timeout*1000),upload:b.fileUpload?c.onSuccess:a}},statics:{CLIENT_INVALID:"client",SERVER_INVALID:"server",CONNECT_FAILURE:"connect",LOAD_FAILURE:"load"}});Ext.define("Ext.form.action.Load",{extend:Ext.form.action.Action,alternateClassName:"Ext.form.Action.Load",alias:"formaction.load",type:"load",run:function(){Ext.Ajax.request(Ext.apply(this.createCallback(),{method:this.getMethod(),url:this.getUrl(),headers:this.headers,params:this.getParams()}))},onSuccess:function(b){var a=this.processResponse(b),c=this.form;if(a===true||!a.success||!a.data){this.failureType=Ext.form.action.Action.LOAD_FAILURE;c.afterAction(this,false);return}c.clearInvalid();c.setValues(a.data);c.afterAction(this,true)},handleResponse:function(c){var a=this.form.reader,b,d;if(a){b=a.read(c);d=b.records&&b.records[0]?b.records[0].data:null;return{success:b.success,data:d}}return Ext.decode(c.responseText)}});Ext.define("Ext.form.action.Submit",{extend:Ext.form.action.Action,alternateClassName:"Ext.form.Action.Submit",alias:"formaction.submit",type:"submit",run:function(){var b=this,a=b.form;if(b.clientValidation===false||a.isValid()){b.doSubmit()}else{b.failureType=Ext.form.action.Action.CLIENT_INVALID;a.afterAction(b,false)}},doSubmit:function(){var e=this,b=Ext.apply(e.createCallback(),{url:e.getUrl(),method:e.getMethod(),headers:e.headers}),d=e.form,g=e.jsonSubmit||d.jsonSubmit,a=g?"jsonData":"params",c,h;if(d.hasUpload()){h=e.buildForm();b.form=h.formEl;b.isUpload=true}else{b[a]=e.getParams(g)}Ext.Ajax.request(b);if(h){e.cleanup(h)}},cleanup:function(h){var e=h.formEl,d=h.uploadEls,b=h.uploadFields,a=b.length,c,g;for(c=0;c<a;++c){g=b[c];if(!g.clearOnSubmit){g.restoreInput(d[c])}}if(e){Ext.removeNode(e)}},getParams:function(d){var c=false,b=this.callParent(),a=this.form.getValues(c,c,this.submitEmptyText!==c,d);return Ext.apply({},a,b)},buildForm:function(){var k=this,n=[],l,s,h=k.form,d=k.getParams(),c=[],a=[],g=h.getFields().items,e,j=g.length,m,r,p,q,o,b;for(e=0;e<j;++e){m=g[e];if(m.rendered&&m.isFileUpload()){c.push(m)}}for(r in d){if(d.hasOwnProperty(r)){p=d[r];if(Ext.isArray(p)){o=p.length;for(q=0;q<o;q++){n.push(k.getFieldConfig(r,p[q]))}}else{n.push(k.getFieldConfig(r,p))}}}l={tag:"form",action:k.getUrl(),method:k.getMethod(),target:k.target||"_self",style:"display:none",cn:n};if(c.length){l.encoding=l.enctype="multipart/form-data"}s=Ext.DomHelper.append(Ext.getBody(),l);j=c.length;for(e=0;e<j;++e){b=c[e].extractFileInput();s.appendChild(b);a.push(b)}return{formEl:s,uploadFields:c,uploadEls:a}},getFieldConfig:function(a,b){return{tag:"input",type:"hidden",name:a,value:Ext.String.htmlEncode(b)}},onSuccess:function(b){var c=this.form,d=true,a=this.processResponse(b);if(a!==true&&!a.success){if(a.errors){c.markInvalid(a.errors)}this.failureType=Ext.form.action.Action.SERVER_INVALID;d=false}c.afterAction(this,d)},handleResponse:function(d){var h=this.form,e=h.errorReader,c,j,g,a,b;if(e){c=e.read(d);b=c.records;j=[];if(b){for(g=0,a=b.length;g<a;g++){j[g]=b[g].data}}if(j.length<1){j=null}return{success:c.success,errors:j}}return Ext.decode(d.responseText)}});Ext.define("Ext.util.ComponentDragger",{extend:Ext.dd.DragTracker,autoStart:500,constructor:function(a,b){this.comp=a;this.initialConstrainTo=b.constrainTo;this.callParent([b])},onStart:function(c){var b=this,a=b.comp;this.startPosition=a.getXY();if(a.ghost&&!a.liveDrag){b.proxy=a.ghost();b.dragTarget=b.proxy.header.el}if(b.constrain||b.constrainDelegate){b.constrainTo=b.calculateConstrainRegion()}if(a.beginDrag){a.beginDrag()}},calculateConstrainRegion:function(){var g=this,d=g.comp,j=g.initialConstrainTo,b,h,i,a=g.proxy?g.proxy.el:d.el,e=(!g.constrainDelegate&&a.shadow&&!a.shadowDisabled)?a.shadow.getShadowSize():0;if(!(j instanceof Ext.util.Region)){b=Ext.fly(j);j=b.getViewRegion();j.right=j.left+b.dom.clientWidth}if(e){j.adjust(e[0],-e[1],-e[2],e[3])}if(!g.constrainDelegate){h=Ext.fly(g.dragTarget).getRegion();i=a.getRegion();j.adjust(h.top-i.top,h.right-i.right,h.bottom-i.bottom,h.left-i.left)}return j},onDrag:function(c){var b=this,a=(b.proxy&&!b.comp.liveDrag)?b.proxy:b.comp,d=b.getOffset(b.constrain||b.constrainDelegate?"dragTarget":null);a.setPagePosition(b.startPosition[0]+d[0],b.startPosition[1]+d[1])},onEnd:function(b){var a=this.comp;if(a.isDestroyed||a.destroying){return}if(this.proxy&&!a.liveDrag){a.unghost()}if(a.endDrag){a.endDrag()}}});Ext.define("Ext.window.Window",{extend:Ext.panel.Panel,alternateClassName:"Ext.Window",alias:"widget.window",baseCls:Ext.baseCSSPrefix+"window",resizable:true,draggable:true,constrain:false,constrainHeader:false,plain:false,minimizable:false,maximizable:false,minHeight:50,minWidth:50,expandOnShow:true,collapsible:false,closable:true,hidden:true,autoRender:true,hideMode:"offsets",floating:true,ariaRole:"alertdialog",itemCls:Ext.baseCSSPrefix+"window-item",initialAlphaNum:/^[a-z0-9]/,overlapHeader:true,ignoreHeaderBorderManagement:true,alwaysFramed:true,isRootCfg:{isRoot:true},isWindow:true,initComponent:function(){var a=this;a.frame=false;a.callParent();a.addEvents("resize","maximize","minimize","restore");if(a.plain){a.addClsWithUI("plain")}if(a.modal){a.ariaRole="dialog"}a.addStateEvents(["maximize","restore","resize","dragend"])},getElConfig:function(){var b=this,a;a=b.callParent();a.tabIndex=-1;return a},getState:function(){var b=this,d=b.callParent()||{},a=!!b.maximized,c=b.ghostBox,e;d.maximized=a;if(a){e=b.restorePos}else{if(c){e=[c.x,c.y]}else{e=b.getPosition()}}Ext.apply(d,{size:a?b.restoreSize:b.getSize(),pos:e});return d},applyState:function(b){var a=this;if(b){a.maximized=b.maximized;if(a.maximized){a.hasSavedRestore=true;a.restoreSize=b.size;a.restorePos=b.pos}else{Ext.apply(a,{width:b.size.width,height:b.size.height,x:b.pos[0],y:b.pos[1]})}}},onRender:function(b,a){var c=this;c.callParent(arguments);c.focusEl=c.el;if(c.maximizable){c.header.on({scope:c,dblclick:c.toggleMaximize})}},afterRender:function(){var a=this,c=a.header,b;a.callParent();if(a.maximized){a.maximized=false;a.maximize();if(c){c.removeCls(c.indicateDragCls)}}if(a.closable){b=a.getKeyMap();b.on(27,a.onEsc,a)}else{b=a.keyMap}if(b&&a.hidden){b.disable()}},initDraggable:function(){this.initSimpleDraggable()},initResizable:function(){this.callParent(arguments);if(this.maximized){this.resizer.disable()}},onEsc:function(a,b){if(!Ext.FocusManager||!Ext.FocusManager.enabled||Ext.FocusManager.focusedCmp===this){b.stopEvent();this.close()}},beforeDestroy:function(){var a=this;if(a.rendered){delete this.animateTarget;a.hide();Ext.destroy(a.keyMap)}a.callParent()},addTools:function(){var a=this;a.callParent();if(a.minimizable){a.addTool({type:"minimize",handler:Ext.Function.bind(a.minimize,a,[])})}if(a.maximizable){a.addTool({type:"maximize",handler:Ext.Function.bind(a.maximize,a,[])});a.addTool({type:"restore",handler:Ext.Function.bind(a.restore,a,[]),hidden:true})}},getFocusEl:function(){return this.getDefaultFocus()},getDefaultFocus:function(){var c=this,b,d=c.defaultButton||c.defaultFocus,a;if(d!==undefined){if(Ext.isNumber(d)){b=c.query("button")[d]}else{if(Ext.isString(d)){a=d;if(a.match(c.initialAlphaNum)){b=c.down("#"+a)}if(!b){b=c.down(a)}}else{if(d.focus){b=d}}}}return b||c.el},onFocus:function(){var b=this,a;if((Ext.FocusManager&&Ext.FocusManager.enabled)||((a=b.getDefaultFocus())===b)){b.callParent(arguments)}else{a.focus()}},beforeLayout:function(){var a=this.el.shadow;this.callParent();if(a){a.hide()}},onShow:function(){var a=this;a.callParent(arguments);if(a.expandOnShow){a.expand(false)}a.syncMonitorWindowResize();if(a.keyMap){a.keyMap.enable()}},doClose:function(){var a=this;if(a.hidden){a.fireEvent("close",a);if(a.closeAction=="destroy"){this.destroy()}}else{a.hide(a.animateTarget,a.doClose,a)}},afterHide:function(){var a=this;a.syncMonitorWindowResize();if(a.keyMap){a.keyMap.disable()}a.callParent(arguments)},onWindowResize:function(){var b=this,a;if(b.maximized){b.fitContainer()}else{a=b.getSizeModel();if(a.width.natural||a.height.natural){b.updateLayout()}b.doConstrain()}},minimize:function(){this.fireEvent("minimize",this);return this},resumeHeaderLayout:function(a){this.header.resumeLayouts(a?this.isRootCfg:null)},afterCollapse:function(){var a=this,c=a.header,b=a.tools;if(c&&a.maximizable){c.suspendLayouts();b.maximize.hide();b.restore.hide();this.resumeHeaderLayout(true)}if(a.resizer){a.resizer.disable()}a.callParent(arguments)},afterExpand:function(){var a=this,d=a.header,b=a.tools,c;if(d){d.suspendLayouts();if(a.maximized){b.restore.show();c=true}else{if(a.maximizable){b.maximize.show();c=true}}this.resumeHeaderLayout(c)}if(a.resizer){a.resizer.enable()}a.callParent(arguments)},maximize:function(a){var b=this,e=b.header,c=b.tools,d;if(!b.maximized){b.expand(false);if(!b.hasSavedRestore){b.restoreSize=b.getSize();b.restorePos=b.getPosition(true)}if(e){e.suspendLayouts();if(c.maximize){c.maximize.hide();d=true}if(c.restore){c.restore.show();d=true}if(b.collapseTool){b.collapseTool.hide();d=true}b.resumeHeaderLayout(d)}b.maximized=true;b.el.disableShadow();if(b.dd){b.dd.disable();if(e){e.removeCls(e.indicateDragCls)}}if(b.resizer){b.resizer.disable()}b.el.addCls(Ext.baseCSSPrefix+"window-maximized");b.container.addCls(Ext.baseCSSPrefix+"window-maximized-ct");b.syncMonitorWindowResize();b.fitContainer(a=(a||!!b.animateTarget)?{callback:function(){b.fireEvent("maximize",b)}}:null);if(!a){b.fireEvent("maximize",b)}}return b},restore:function(b){var c=this,d=c.tools,g=c.header,a=c.restoreSize,e;if(c.maximized){c.hasSavedRestore=null;c.removeCls(Ext.baseCSSPrefix+"window-maximized");if(g){g.suspendLayouts();if(d.restore){d.restore.hide();e=true}if(d.maximize){d.maximize.show();e=true}if(c.collapseTool){c.collapseTool.show();e=true}c.resumeHeaderLayout(e)}c.maximized=false;a.x=c.restorePos[0];a.y=c.restorePos[1];c.setBox(a,b=(b||!!c.animateTarget)?{callback:function(){c.el.enableShadow(true);c.fireEvent("restore",c)}}:null);c.restorePos=c.restoreSize=null;if(c.dd){c.dd.enable();if(g){g.addCls(g.indicateDragCls)}}if(c.resizer){c.resizer.enable()}c.container.removeCls(Ext.baseCSSPrefix+"window-maximized-ct");c.syncMonitorWindowResize();if(!b){c.el.enableShadow(true);c.fireEvent("restore",c)}}return c},syncMonitorWindowResize:function(){var b=this,c=b._monitoringResize,d=b.monitorResize||b.constrain||b.constrainHeader||b.maximized,a=b.hidden||b.destroying||b.isDestroyed;if(d&&!a){if(!c){Ext.EventManager.onWindowResize(b.onWindowResize,b,{delay:1});b._monitoringResize=true}}else{if(c){Ext.EventManager.removeResizeListener(b.onWindowResize,b);b._monitoringResize=false}}},toggleMaximize:function(){return this[this.maximized?"restore":"maximize"]()}});Ext.define("Ext.form.Labelable",{autoEl:{tag:"table",cellpadding:0},childEls:["labelCell","labelEl","bodyEl","sideErrorCell","errorEl","inputRow"],labelableRenderTpl:['<tr id="{id}-inputRow" <tpl if="inFormLayout">id="{id}"</tpl>>','<tpl if="labelOnLeft">','<td id="{id}-labelCell" style="{labelCellStyle}" {labelCellAttrs}>',"{beforeLabelTpl}",'<label id="{id}-labelEl" {labelAttrTpl}<tpl if="inputId"> for="{inputId}"</tpl> class="{labelCls}"','<tpl if="labelStyle"> style="{labelStyle}"</tpl>',' unselectable="on"',">","{beforeLabelTextTpl}",'<tpl if="fieldLabel">{fieldLabel}{labelSeparator}</tpl>',"{afterLabelTextTpl}","</label>","{afterLabelTpl}","</td>","</tpl>",'<td class="{baseBodyCls} {fieldBodyCls}" id="{id}-bodyEl" colspan="{bodyColspan}" role="presentation">',"{beforeBodyEl}","<tpl if=\"labelAlign=='top'\">","{beforeLabelTpl}",'<div id="{id}-labelCell" style="{labelCellStyle}">','<label id="{id}-labelEl" {labelAttrTpl}<tpl if="inputId"> for="{inputId}"</tpl> class="{labelCls}"','<tpl if="labelStyle"> style="{labelStyle}"</tpl>',' unselectable="on"',">","{beforeLabelTextTpl}",'<tpl if="fieldLabel">{fieldLabel}{labelSeparator}</tpl>',"{afterLabelTextTpl}","</label>","</div>","{afterLabelTpl}","</tpl>","{beforeSubTpl}","{[values.$comp.getSubTplMarkup(values)]}","{afterSubTpl}","<tpl if=\"msgTarget==='side'\">","{afterBodyEl}","</td>","<td id=\"{id}-sideErrorCell\" vAlign=\"{[values.labelAlign==='top' && !values.hideLabel ? 'bottom' : 'middle']}\" style=\"{[values.autoFitErrors ? 'display:none' : '']}\" width=\"{errorIconWidth}\">",'<div id="{id}-errorEl" class="{errorMsgCls}" style="display:none"></div>',"</td>","<tpl elseif=\"msgTarget=='under'\">",'<div id="{id}-errorEl" class="{errorMsgClass}" colspan="2" style="display:none"></div>',"{afterBodyEl}","</td>","</tpl>","</tr>",{disableFormats:true}],activeErrorsTpl:undefined,htmlActiveErrorsTpl:['<tpl if="errors && errors.length">','<ul class="{listCls}"><tpl for="errors"><li>{.}</li></tpl></ul>',"</tpl>"],plaintextActiveErrorsTpl:['<tpl if="errors && errors.length">','<tpl for="errors"><tpl if="xindex &gt; 1">\n</tpl>{.}</tpl>',"</tpl>"],isFieldLabelable:true,formItemCls:Ext.baseCSSPrefix+"form-item",labelCls:Ext.baseCSSPrefix+"form-item-label",errorMsgCls:Ext.baseCSSPrefix+"form-error-msg",baseBodyCls:Ext.baseCSSPrefix+"form-item-body",fieldBodyCls:"",clearCls:Ext.baseCSSPrefix+"clear",invalidCls:Ext.baseCSSPrefix+"form-invalid",fieldLabel:undefined,labelAlign:"left",labelWidth:100,labelPad:5,labelSeparator:":",hideLabel:false,hideEmptyLabel:true,preventMark:false,autoFitErrors:true,msgTarget:"qtip",noWrap:true,labelableInsertions:["beforeBodyEl","afterBodyEl","beforeLabelTpl","afterLabelTpl","beforeSubTpl","afterSubTpl","beforeLabelTextTpl","afterLabelTextTpl","labelAttrTpl"],labelableRenderProps:["allowBlank","id","labelAlign","fieldBodyCls","baseBodyCls","clearCls","labelSeparator","msgTarget"],initLabelable:function(){var a=this,b=a.padding;if(b){a.padding=undefined;a.extraMargins=Ext.Element.parseBox(b)}if(!a.activeErrorsTpl){if(a.msgTarget=="title"){a.activeErrorsTpl=a.plaintextActiveErrorsTpl}else{a.activeErrorsTpl=a.htmlActiveErrorsTpl}}a.addCls(Ext.plainTableCls);a.addCls(a.formItemCls);a.lastActiveError="";a.addEvents("errorchange");a.enableBubble("errorchange")},trimLabelSeparator:function(){var c=this,d=c.labelSeparator,a=c.fieldLabel||"",b=a.substr(a.length-1);return b===d?a.slice(0,-1):a},getFieldLabel:function(){return this.trimLabelSeparator()},setFieldLabel:function(b){b=b||"";var c=this,d=c.labelSeparator,a=c.labelEl;c.fieldLabel=b;if(c.rendered){if(Ext.isEmpty(b)&&c.hideEmptyLabel){a.parent().setDisplayed("none")}else{if(d){b=c.trimLabelSeparator()+d}a.update(b);a.parent().setDisplayed("")}c.updateLayout()}},getInsertionRenderData:function(d,e){var b=e.length,a,c;while(b--){a=e[b];c=this[a];if(c){if(typeof c!="string"){if(!c.isTemplate){c=Ext.XTemplate.getTpl(this,a)}c=c.apply(d)}}d[a]=c||""}return d},getLabelableRenderData:function(){var b=this,c,d,a=b.labelAlign==="top";if(!Ext.form.Labelable.errorIconWidth){d=Ext.getBody().createChild({style:"position:absolute",cls:Ext.baseCSSPrefix+"form-invalid-icon"});Ext.form.Labelable.errorIconWidth=d.getWidth()+d.getMargin("l");d.remove()}c=Ext.copyTo({inFormLayout:b.ownerLayout&&b.ownerLayout.type==="form",inputId:b.getInputId(),labelOnLeft:!a,hideLabel:!b.hasVisibleLabel(),fieldLabel:b.getFieldLabel(),labelCellStyle:b.getLabelCellStyle(),labelCellAttrs:b.getLabelCellAttrs(),labelCls:b.getLabelCls(),labelStyle:b.getLabelStyle(),bodyColspan:b.getBodyColspan(),externalError:!b.autoFitErrors,errorMsgCls:b.getErrorMsgCls(),errorIconWidth:Ext.form.Labelable.errorIconWidth},b,b.labelableRenderProps,true);b.getInsertionRenderData(c,b.labelableInsertions);return c},xhooks:{beforeRender:function(){var a=this;a.setFieldDefaults(a.getHierarchyState().fieldDefaults);if(a.ownerLayout){a.addCls(Ext.baseCSSPrefix+a.ownerLayout.type+"-form-item")}},onRender:function(){var c=this,d,a,b={};if(c.extraMargins){d=c.el.getMargin();for(a in d){if(d.hasOwnProperty(a)){b["margin-"+a]=(d[a]+c.extraMargins[a])+"px"}}c.el.setStyle(b)}}},hasVisibleLabel:function(){if(this.hideLabel){return false}return !(this.hideEmptyLabel&&!this.getFieldLabel())},getLabelWidth:function(){var a=this;if(!a.hasVisibleLabel()){return 0}return a.labelWidth+a.labelPad},getBodyColspan:function(){var b=this,a;if(b.msgTarget==="side"&&(!b.autoFitErrors||b.hasActiveError())){a=1}else{a=2}if(b.labelAlign!=="top"&&!b.hasVisibleLabel()){a++}return a},getLabelCls:function(){var b=this.labelCls+" "+Ext.dom.Element.unselectableCls,a=this.labelClsExtra;return a?b+" "+a:b},getLabelCellStyle:function(){var b=this,a=b.hideLabel||(!b.fieldLabel&&b.hideEmptyLabel);return a?"display:none;":""},getErrorMsgCls:function(){var b=this,a=(b.hideLabel||(!b.fieldLabel&&b.hideEmptyLabel));return b.errorMsgCls+(!a&&b.labelAlign==="top"?" "+Ext.baseCSSPrefix+"lbl-top-err-icon":"")},getLabelCellAttrs:function(){var c=this,b=c.labelAlign,a="";if(b!=="top"){a='valign="top" halign="'+b+'" width="'+(c.labelWidth+c.labelPad)+'"'}return a+' class="'+Ext.baseCSSPrefix+'field-label-cell"'},getLabelStyle:function(){var c=this,b=c.labelPad,a="";if(c.labelAlign!=="top"){if(c.labelWidth){a="width:"+c.labelWidth+"px;"}if(b){a+="margin-right:"+b+"px;"}}return a+(c.labelStyle||"")},getSubTplMarkup:function(){return""},getInputId:function(){return""},getActiveError:function(){return this.activeError||""},hasActiveError:function(){return !!this.getActiveError()},setActiveError:function(a){this.setActiveErrors(a)},getActiveErrors:function(){return this.activeErrors||[]},setActiveErrors:function(a){a=Ext.Array.from(a);this.activeError=a[0];this.activeErrors=a;this.activeError=this.getTpl("activeErrorsTpl").apply({errors:a,listCls:Ext.plainListCls});this.renderActiveError()},unsetActiveError:function(){delete this.activeError;delete this.activeErrors;this.renderActiveError()},renderActiveError:function(){var c=this,b=c.getActiveError(),a=!!b;if(b!==c.lastActiveError){c.fireEvent("errorchange",c,b);c.lastActiveError=b}if(c.rendered&&!c.isDestroyed&&!c.preventMark){c.el[a?"addCls":"removeCls"](c.invalidCls);c.getActionEl().dom.setAttribute("aria-invalid",a);if(c.errorEl){c.errorEl.dom.innerHTML=b}}},setFieldDefaults:function(b){var a;for(a in b){if(!this.hasOwnProperty(a)){this[a]=b[a]}}}});Ext.define("Ext.form.field.Field",{isFormField:true,disabled:false,submitValue:true,validateOnChange:true,suspendCheckChange:0,initField:function(){this.addEvents("change","validitychange","dirtychange");this.initValue()},initValue:function(){var a=this;a.value=a.transformOriginalValue(a.value);a.originalValue=a.lastValue=a.value;a.suspendCheckChange++;a.setValue(a.value);a.suspendCheckChange--},transformOriginalValue:Ext.identityFn,getName:function(){return this.name},getValue:function(){return this.value},setValue:function(b){var a=this;a.value=b;a.checkChange();return a},isEqual:function(b,a){return String(b)===String(a)},isEqualAsString:function(b,a){return String(Ext.value(b,""))===String(Ext.value(a,""))},getSubmitData:function(){var a=this,b=null;if(!a.disabled&&a.submitValue&&!a.isFileUpload()){b={};b[a.getName()]=""+a.getValue()}return b},getModelData:function(){var a=this,b=null;if(!a.disabled&&!a.isFileUpload()){b={};b[a.getName()]=a.getValue()}return b},reset:function(){var a=this;a.beforeReset();a.setValue(a.originalValue);a.clearInvalid();delete a.wasValid},beforeReset:Ext.emptyFn,resetOriginalValue:function(){this.originalValue=this.getValue();this.checkDirty()},checkChange:function(){if(!this.suspendCheckChange){var c=this,b=c.getValue(),a=c.lastValue;if(!c.isEqual(b,a)&&!c.isDestroyed){c.lastValue=b;c.fireEvent("change",c,b,a);c.onChange(b,a)}}},onChange:function(b,a){if(this.validateOnChange){this.validate()}this.checkDirty()},isDirty:function(){var a=this;return !a.disabled&&!a.isEqual(a.getValue(),a.originalValue)},checkDirty:function(){var a=this,b=a.isDirty();if(b!==a.wasDirty){a.fireEvent("dirtychange",a,b);a.onDirtyChange(b);a.wasDirty=b}},onDirtyChange:Ext.emptyFn,getErrors:function(a){return[]},isValid:function(){var a=this;return a.disabled||Ext.isEmpty(a.getErrors())},validate:function(){var a=this,b=a.isValid();if(b!==a.wasValid){a.wasValid=b;a.fireEvent("validitychange",a,b)}return b},batchChanges:function(a){try{this.suspendCheckChange++;a()}catch(b){throw b}finally{this.suspendCheckChange--}this.checkChange()},isFileUpload:function(){return false},extractFileInput:function(){return null},markInvalid:Ext.emptyFn,clearInvalid:Ext.emptyFn});Ext.define("Ext.layout.component.field.Field",{extend:Ext.layout.component.Auto,alias:"layout.field",type:"field",naturalSizingProp:"size",beginLayout:function(c){var b=this,a=b.owner;b.callParent(arguments);c.labelStrategy=b.getLabelStrategy();c.errorStrategy=b.getErrorStrategy();c.labelContext=c.getEl("labelEl");c.bodyCellContext=c.getEl("bodyEl");c.inputContext=c.getEl("inputEl");c.errorContext=c.getEl("errorEl");if(Ext.isIE7m&&Ext.isStrict&&c.inputContext){b.ieInputWidthAdjustment=c.inputContext.getPaddingInfo().width+c.inputContext.getBorderInfo().width}c.labelStrategy.prepare(c,a);c.errorStrategy.prepare(c,a)},beginLayoutCycle:function(g){var e=this,a=e.owner,c=g.widthModel,b=a[e.naturalSizingProp],d;e.callParent(arguments);if(c.shrinkWrap){e.beginLayoutShrinkWrap(g)}else{if(c.natural){if(typeof b=="number"&&!a.inputWidth){e.beginLayoutFixed(g,(d=b*6.5+20),"px")}else{e.beginLayoutShrinkWrap(g)}g.setWidth(d,false)}else{e.beginLayoutFixed(g,"100","%")}}},beginLayoutFixed:function(c,b,e){var a=c.target,d=a.inputEl,g=a.inputWidth;a.el.setStyle("table-layout","fixed");a.bodyEl.setStyle("width",b+e);if(d){if(g){d.setStyle("width",g+"px")}else{d.setStyle("width",a.stretchInputElFixed?"100%":"")}}c.isFixed=true},beginLayoutShrinkWrap:function(b){var a=b.target,c=a.inputEl,d=a.inputWidth;if(c&&c.dom){c.dom.removeAttribute("size");if(d){c.setStyle("width",d+"px")}else{c.setStyle("width","")}}a.el.setStyle("table-layout","auto");a.bodyEl.setStyle("width","")},finishedLayout:function(b){var a=this.owner;this.callParent(arguments);b.labelStrategy.finishedLayout(b,a);b.errorStrategy.finishedLayout(b,a)},calculateOwnerHeightFromContentHeight:function(b,a){return a},measureContentHeight:function(a){return a.el.getHeight()},measureContentWidth:function(a){return a.el.getWidth()},measureLabelErrorHeight:function(a){return a.labelStrategy.getHeight(a)+a.errorStrategy.getHeight(a)},onFocus:function(){this.getErrorStrategy().onFocus(this.owner)},getLabelStrategy:function(){var b=this,c=b.labelStrategies,a=b.owner.labelAlign;return c[a]||c.base},getErrorStrategy:function(){var c=this,a=c.owner,d=c.errorStrategies,b=a.msgTarget;return !a.preventMark&&Ext.isString(b)?(d[b]||d.elementId):d.none},labelStrategies:(function(){var a={prepare:function(e,b){var c=b.labelCls+"-"+b.labelAlign,d=b.labelEl;if(d){d.addCls(c)}},getHeight:function(){return 0},finishedLayout:Ext.emptyFn};return{base:a,top:Ext.applyIf({getHeight:function(e){var c=e.labelContext,d=c.props,b=d.height;if(b===undefined){d.height=b=c.el.getHeight()}return b}},a),left:a,right:a}}()),errorStrategies:(function(){function d(h){var i=Ext.layout.component.field.Field.tip,j;if(i&&i.isVisible()){j=i.activeTarget;if(j&&j.el===h.getActionEl().dom){i.toFront(true)}}}var c=Ext.applyIf,b=Ext.emptyFn,a=Ext.baseCSSPrefix+"form-invalid-icon",g,e={prepare:function(j,h){var i=h.errorEl;if(i){i.setDisplayed(false)}},getHeight:function(){return 0},onFocus:b,finishedLayout:b};return{none:e,side:c({prepare:function(k,i){var m=i.errorEl,j=i.sideErrorCell,h=i.hasActiveError(),l;if(!g){g=(l=Ext.getBody().createChild({style:"position:absolute",cls:a})).getWidth();l.remove()}m.addCls(a);m.set({"data-errorqtip":i.getActiveError()||""});if(i.autoFitErrors){m.setDisplayed(h)}else{m.setVisible(h)}if(j&&i.autoFitErrors){j.setDisplayed(h)}i.bodyEl.dom.colSpan=i.getBodyColspan();Ext.layout.component.field.Field.initTip()},onFocus:d},e),under:c({prepare:function(j,h){var k=h.errorEl,i=Ext.baseCSSPrefix+"form-invalid-under";k.addCls(i);k.setDisplayed(h.hasActiveError())},getHeight:function(k){var h=0,i,j;if(k.target.hasActiveError()){i=k.errorContext;j=i.props;h=j.height;if(h===undefined){j.height=h=i.el.getHeight()}}return h}},e),qtip:c({prepare:function(i,h){Ext.layout.component.field.Field.initTip();h.getActionEl().dom.setAttribute("data-errorqtip",h.getActiveError()||"")},onFocus:d},e),title:c({prepare:function(i,h){h.getActionEl().dom.setAttribute("title",h.getActiveError()||"")}},e),elementId:c({prepare:function(i,h){var j=Ext.fly(h.msgTarget);if(j){j.dom.innerHTML=h.getActiveError()||"";j.setDisplayed(h.hasActiveError())}}},e)}}()),statics:{initTip:function(){var a=this.tip;if(!a){a=this.tip=Ext.create("Ext.tip.QuickTip",{ui:"form-invalid"});a.tagConfig=Ext.apply({},{attribute:"errorqtip"},a.tagConfig)}},destroyTip:function(){var a=this.tip;if(a){a.destroy();delete this.tip}}}});Ext.define("Ext.form.field.Base",{extend:Ext.Component,mixins:{labelable:Ext.form.Labelable,field:Ext.form.field.Field},alias:"widget.field",alternateClassName:["Ext.form.Field","Ext.form.BaseField"],fieldSubTpl:['<input id="{id}" type="{type}" {inputAttrTpl}',' size="1"','<tpl if="name"> name="{name}"</tpl>','<tpl if="value"> value="{[Ext.util.Format.htmlEncode(values.value)]}"</tpl>','<tpl if="placeholder"> placeholder="{placeholder}"</tpl>','{%if (values.maxLength !== undefined){%} maxlength="{maxLength}"{%}%}','<tpl if="readOnly"> readonly="readonly"</tpl>','<tpl if="disabled"> disabled="disabled"</tpl>','<tpl if="tabIdx"> tabIndex="{tabIdx}"</tpl>','<tpl if="fieldStyle"> style="{fieldStyle}"</tpl>',' class="{fieldCls} {typeCls} {editableCls} {inputCls}" autocomplete="off"/>',{disableFormats:true}],subTplInsertions:["inputAttrTpl"],inputType:"text",invalidText:"The value in this field is invalid",fieldCls:Ext.baseCSSPrefix+"form-field",focusCls:"form-focus",dirtyCls:Ext.baseCSSPrefix+"form-dirty",checkChangeEvents:Ext.isIE&&(!document.documentMode||document.documentMode<9)?["change","propertychange","keyup"]:["change","input","textInput","keyup","dragdrop"],checkChangeBuffer:50,componentLayout:"field",readOnly:false,readOnlyCls:Ext.baseCSSPrefix+"form-readonly",validateOnBlur:true,hasFocus:false,baseCls:Ext.baseCSSPrefix+"field",maskOnDisable:false,stretchInputElFixed:true,initComponent:function(){var a=this;a.callParent();a.subTplData=a.subTplData||{};a.addEvents("specialkey","writeablechange");a.initLabelable();a.initField();if(!a.name){a.name=a.getInputId()}if(a.readOnly){a.addCls(a.readOnlyCls)}},getInputId:function(){return this.inputId||(this.inputId=this.id+"-inputEl")},getSubTplData:function(){var c=this,b=c.inputType,a=c.getInputId(),d;d=Ext.apply({id:a,cmpId:c.id,name:c.name||a,disabled:c.disabled,readOnly:c.readOnly,value:c.getRawValue(),type:b,fieldCls:c.fieldCls,fieldStyle:c.getFieldStyle(),tabIdx:c.tabIndex,inputCls:c.inputCls,typeCls:Ext.baseCSSPrefix+"form-"+(b==="password"?"text":b)},c.subTplData);c.getInsertionRenderData(d,c.subTplInsertions);return d},applyRenderSelectors:function(){var a=this;a.callParent();a.addChildEls("inputEl");a.inputEl=a.el.getById(a.getInputId())},getSubTplMarkup:function(){return this.getTpl("fieldSubTpl").apply(this.getSubTplData())},initRenderTpl:function(){var a=this;if(!a.hasOwnProperty("renderTpl")){a.renderTpl=a.getTpl("labelableRenderTpl")}return a.callParent()},initRenderData:function(){return Ext.applyIf(this.callParent(),this.getLabelableRenderData())},setFieldStyle:function(a){var b=this,c=b.inputEl;if(c){c.applyStyles(a)}b.fieldStyle=a},getFieldStyle:function(){return Ext.isObject(this.fieldStyle)?Ext.DomHelper.generateStyles(this.fieldStyle):this.fieldStyle||""},onRender:function(){this.callParent(arguments);this.renderActiveError()},getFocusEl:function(){return this.inputEl},isFileUpload:function(){return this.inputType==="file"},getSubmitData:function(){var a=this,b=null,c;if(!a.disabled&&a.submitValue&&!a.isFileUpload()){c=a.getSubmitValue();if(c!==null){b={};b[a.getName()]=c}}return b},getSubmitValue:function(){return this.processRawValue(this.getRawValue())},getRawValue:function(){var b=this,a=(b.inputEl?b.inputEl.getValue():Ext.value(b.rawValue,""));b.rawValue=a;return a},setRawValue:function(b){var a=this;b=Ext.value(a.transformRawValue(b),"");a.rawValue=b;if(a.inputEl){a.inputEl.dom.value=b}return b},transformRawValue:Ext.identityFn,valueToRaw:function(a){return""+Ext.value(a,"")},rawToValue:Ext.identityFn,processRawValue:Ext.identityFn,getValue:function(){var a=this,b=a.rawToValue(a.processRawValue(a.getRawValue()));a.value=b;return b},setValue:function(b){var a=this;a.setRawValue(a.valueToRaw(b));return a.mixins.field.setValue.call(a,b)},onBoxReady:function(){var a=this;a.callParent();if(a.setReadOnlyOnBoxReady){a.setReadOnly(a.readOnly)}},onDisable:function(){var a=this,b=a.inputEl;a.callParent();if(b){b.dom.disabled=true;if(a.hasActiveError()){a.clearInvalid();a.needsValidateOnEnable=true}}},onEnable:function(){var a=this,b=a.inputEl;a.callParent();if(b){b.dom.disabled=false;if(a.needsValidateOnEnable){delete a.needsValidateOnEnable;a.forceValidation=true;a.isValid();delete a.forceValidation}}},setReadOnly:function(c){var a=this,b=a.inputEl;c=!!c;a[c?"addCls":"removeCls"](a.readOnlyCls);a.readOnly=c;if(b){b.dom.readOnly=c}else{if(a.rendering){a.setReadOnlyOnBoxReady=true}}a.fireEvent("writeablechange",a,c)},fireKey:function(a){if(a.isSpecialKey()){this.fireEvent("specialkey",this,new Ext.EventObjectImpl(a))}},initEvents:function(){var g=this,i=g.inputEl,b,j,c=g.checkChangeEvents,h,a=c.length,d;if(g.inEditor){g.onBlur=Ext.Function.createBuffered(g.onBlur,10)}if(i){g.mon(i,Ext.EventManager.getKeyEvent(),g.fireKey,g);b=new Ext.util.DelayedTask(g.checkChange,g);g.onChangeEvent=j=function(){b.delay(g.checkChangeBuffer)};for(h=0;h<a;h++){d=c[h];if(d==="propertychange"){g.usesPropertychange=true}g.mon(i,d,j)}}g.callParent()},doComponentLayout:function(){var c=this,d=c.inputEl,a=c.usesPropertychange,b="propertychange",e=c.onChangeEvent;if(a){c.mun(d,b,e)}c.callParent(arguments);if(a){c.mon(d,b,e)}},onDirtyChange:function(a){this[a?"addCls":"removeCls"](this.dirtyCls)},isValid:function(){var b=this,a=b.disabled,c=b.forceValidation||!a;return c?b.validateValue(b.processRawValue(b.getRawValue())):a},validateValue:function(b){var a=this,d=a.getErrors(b),c=Ext.isEmpty(d);if(!a.preventMark){if(c){a.clearInvalid()}else{a.markInvalid(d)}}return c},markInvalid:function(d){var b=this,a=b.getActiveError(),c;b.setActiveErrors(Ext.Array.from(d));c=b.getActiveError();if(a!==c){b.setError(c)}},clearInvalid:function(){var b=this,a=b.hasActiveError();delete b.needsValidateOnEnable;b.unsetActiveError();if(a){b.setError("")}},setError:function(c){var b=this,a=b.msgTarget,d;if(b.rendered){if(a=="title"||a=="qtip"){if(b.rendered){d=a=="qtip"?"data-errorqtip":"title"}b.getActionEl().dom.setAttribute(d,c||"")}else{b.updateLayout()}}},renderActiveError:function(){var b=this,a=b.hasActiveError();if(b.inputEl){b.inputEl[a?"addCls":"removeCls"](b.invalidCls+"-field")}b.mixins.labelable.renderActiveError.call(b)},getActionEl:function(){return this.inputEl||this.el}});Ext.define("Ext.form.field.VTypes",(function(){var c=/^[a-zA-Z_]+$/,d=/^[a-zA-Z0-9_]+$/,b=/^(")?(?:[^\."])(?:(?:[\.])?(?:[\w\-!#$%&'*+/=?^_`{|}~]))*\1@(\w[\-\w]*\.){1,5}([A-Za-z]){2,6}$/,a=/(((^https?)|(^ftp)):\/\/((([\-\w]+\.)+\w{2,3}(\/[%\-\w]+(\.\w{2,})?)*(([\w\-\.\?\\\/+@&#;`~=%!]*)(\.\w{2,})?)*)|(localhost|LOCALHOST))\/?)/i;return{singleton:true,alternateClassName:"Ext.form.VTypes",email:function(e){return b.test(e)},emailText:'This field should be an e-mail address in the format "user@example.com"',emailMask:/[\w.\-@'"!#$%&'*+/=?^_`{|}~]/i,url:function(e){return a.test(e)},urlText:'This field should be a URL in the format "http://www.example.com"',alpha:function(e){return c.test(e)},alphaText:"This field should only contain letters and _",alphaMask:/[a-z_]/i,alphanum:function(e){return d.test(e)},alphanumText:"This field should only contain letters, numbers and _",alphanumMask:/[a-z0-9_]/i}}()));Ext.define("Ext.layout.component.field.Text",{extend:Ext.layout.component.field.Field,alias:"layout.textfield",type:"textfield",canGrowWidth:true,beginLayoutCycle:function(a){this.callParent(arguments);if(a.heightModel.shrinkWrap){a.inputContext.el.setStyle("height","")}},measureContentWidth:function(c){var h=this,b=h.owner,a=h.callParent(arguments),g=c.inputContext,k,j,d,i,e;if(b.grow&&h.canGrowWidth&&!c.state.growHandled){k=b.inputEl;j=Ext.util.Format.htmlEncode(k.dom.value||(b.hasFocus?"":b.emptyText)||"");j+=b.growAppend;d=k.getTextWidth(j)+g.getFrameInfo().width;i=b.growMax;e=Math.min(i,a);i=Math.max(b.growMin,i,e);d=Ext.Number.constrain(d,b.growMin,i);g.setWidth(d);c.state.growHandled=true;g.domBlock(h,"width");a=NaN}return a},publishInnerHeight:function(b,a){b.inputContext.setHeight(a-this.measureLabelErrorHeight(b))},beginLayoutFixed:function(d,a,e){var b=this,c=b.ieInputWidthAdjustment;if(c){b.adjustIEInputPadding(d);if(e==="px"){a-=c}}b.callParent(arguments)},adjustIEInputPadding:function(a){this.owner.bodyEl.setStyle("padding-right",this.ieInputWidthAdjustment+"px")}});Ext.define("Ext.form.field.Text",{extend:Ext.form.field.Base,alias:"widget.textfield",alternateClassName:["Ext.form.TextField","Ext.form.Text"],size:20,growMin:30,growMax:800,growAppend:"W",allowBlank:true,validateBlank:false,allowOnlyWhitespace:true,minLength:0,maxLength:Number.MAX_VALUE,minLengthText:"The minimum length for this field is {0}",maxLengthText:"The maximum length for this field is {0}",blankText:"This field is required",regexText:"",emptyCls:Ext.baseCSSPrefix+"form-empty-field",requiredCls:Ext.baseCSSPrefix+"form-required-field",componentLayout:"textfield",valueContainsPlaceholder:false,initComponent:function(){var a=this;if(a.allowOnlyWhitespace===false){a.allowBlank=false}a.callParent();a.addEvents("autosize","keydown","keyup","keypress");a.addStateEvents("change");a.setGrowSizePolicy()},setGrowSizePolicy:function(){if(this.grow){this.shrinkWrap|=1}},initEvents:function(){var b=this,a=b.inputEl;b.callParent();if(b.selectOnFocus||b.emptyText){b.mon(a,"mousedown",b.onMouseDown,b)}if(b.maskRe||(b.vtype&&b.disableKeyFilter!==true&&(b.maskRe=Ext.form.field.VTypes[b.vtype+"Mask"]))){b.mon(a,"keypress",b.filterKeys,b)}if(b.enableKeyEvents){b.mon(a,{scope:b,keyup:b.onKeyUp,keydown:b.onKeyDown,keypress:b.onKeyPress})}},isEqual:function(b,a){return this.isEqualAsString(b,a)},onChange:function(){this.callParent();this.autoSize()},getSubTplData:function(){var b=this,c=b.getRawValue(),e=b.emptyText&&c.length<1,a=b.maxLength,d;if(b.enforceMaxLength){if(a===Number.MAX_VALUE){a=undefined}}else{a=undefined}if(e){if(Ext.supports.Placeholder){d=b.emptyText}else{c=b.emptyText;b.valueContainsPlaceholder=true}}return Ext.apply(b.callParent(),{maxLength:a,readOnly:b.readOnly,placeholder:d,value:c,fieldCls:b.fieldCls+((e&&(d||c))?" "+b.emptyCls:"")+(b.allowBlank?"":" "+b.requiredCls)})},afterRender:function(){this.autoSize();this.callParent()},onMouseDown:function(b){var a=this;if(!a.hasFocus){a.mon(a.inputEl,"mouseup",Ext.emptyFn,a,{single:true,preventDefault:true})}},processRawValue:function(b){var a=this,d=a.stripCharsRe,c;if(d){c=b.replace(d,"");if(c!==b){a.setRawValue(c);b=c}}return b},onDisable:function(){this.callParent();if(Ext.isIE){this.inputEl.dom.unselectable="on"}},onEnable:function(){this.callParent();if(Ext.isIE){this.inputEl.dom.unselectable=""}},onKeyDown:function(a){this.fireEvent("keydown",this,a)},onKeyUp:function(a){this.fireEvent("keyup",this,a)},onKeyPress:function(a){this.fireEvent("keypress",this,a)},reset:function(){this.callParent();this.applyEmptyText()},applyEmptyText:function(){var b=this,a=b.emptyText,c;if(b.rendered&&a){c=b.getRawValue().length<1&&!b.hasFocus;if(Ext.supports.Placeholder){b.inputEl.dom.placeholder=a}else{if(c){b.setRawValue(a);b.valueContainsPlaceholder=true}}if(c){b.inputEl.addCls(b.emptyCls)}b.autoSize()}},afterFirstLayout:function(){this.callParent();if(Ext.isIE&&this.disabled){var a=this.inputEl;if(a){a.dom.unselectable="on"}}},beforeFocus:function(){var b=this,c=b.inputEl,a=b.emptyText,d;b.callParent(arguments);if((a&&!Ext.supports.Placeholder)&&(c.dom.value===b.emptyText&&b.valueContainsPlaceholder)){b.setRawValue("");d=true;c.removeCls(b.emptyCls);b.valueContainsPlaceholder=false}else{if(Ext.supports.Placeholder){b.inputEl.removeCls(b.emptyCls)}}if(b.selectOnFocus||d){if(Ext.isWebKit){if(!b.inputFocusTask){b.inputFocusTask=new Ext.util.DelayedTask(b.focusInput,b)}b.inputFocusTask.delay(1)}else{c.dom.select()}}},focusInput:function(){var a=this.inputEl;if(a){a=a.dom;if(a){a.select()}}},onFocus:function(){var a=this;a.callParent(arguments);if(a.emptyText){a.autoSize()}},postBlur:function(){this.callParent(arguments);this.applyEmptyText()},filterKeys:function(c){if(c.ctrlKey&&!c.altKey){return}var b=c.getKey(),a=String.fromCharCode(c.getCharCode());if((Ext.isGecko||Ext.isOpera)&&(c.isNavKeyPress()||b===c.BACKSPACE||(b===c.DELETE&&c.button===-1))){return}if((!Ext.isGecko&&!Ext.isOpera)&&c.isSpecialKey()&&!a){return}if(!this.maskRe.test(a)){c.stopEvent()}},getState:function(){return this.addPropertyToState(this.callParent(),"value")},applyState:function(a){this.callParent(arguments);if(a.hasOwnProperty("value")){this.setValue(a.value)}},getRawValue:function(){var b=this,a=b.callParent();if(a===b.emptyText&&b.valueContainsPlaceholder){a=""}return a},setValue:function(b){var a=this,c=a.inputEl;if(c&&a.emptyText&&!Ext.isEmpty(b)){c.removeCls(a.emptyCls);a.valueContainsPlaceholder=false}a.callParent(arguments);a.applyEmptyText();return a},getErrors:function(l){var g=this,j=g.callParent(arguments),a=g.validator,d=g.vtype,h=Ext.form.field.VTypes,i=g.regex,k=Ext.String.format,b,e,c;l=l||g.processRawValue(g.getRawValue());if(Ext.isFunction(a)){b=a.call(g,l);if(b!==true){j.push(b)}}e=g.allowOnlyWhitespace?l:Ext.String.trim(l);if(e.length<1||(l===g.emptyText&&g.valueContainsPlaceholder)){if(!g.allowBlank){j.push(g.blankText)}if(!g.validateBlank){return j}c=true}if(!c&&l.length<g.minLength){j.push(k(g.minLengthText,g.minLength))}if(l.length>g.maxLength){j.push(k(g.maxLengthText,g.maxLength))}if(d){if(!h[d](l,g)){j.push(g.vtypeText||h[d+"Text"])}}if(i&&!i.test(l)){j.push(g.regexText||g.invalidText)}return j},selectText:function(i,a){var h=this,c=h.getRawValue(),d=true,g=h.inputEl.dom,e,b;if(c.length>0){i=i===e?0:i;a=a===e?c.length:a;if(g.setSelectionRange){g.setSelectionRange(i,a)}else{if(g.createTextRange){b=g.createTextRange();b.moveStart("character",i);b.moveEnd("character",a-c.length);b.select()}}d=Ext.isGecko||Ext.isOpera}if(d){h.focus()}},autoSize:function(){var a=this;if(a.grow&&a.rendered){a.autoSizing=true;a.updateLayout()}},afterComponentLayout:function(){var b=this,a;b.callParent(arguments);if(b.autoSizing){a=b.inputEl.getWidth();if(a!==b.lastInputWidth){b.fireEvent("autosize",b,a);b.lastInputWidth=a;delete b.autoSizing}}},onDestroy:function(){var a=this;a.callParent();if(a.inputFocusTask){a.inputFocusTask.cancel();a.inputFocusTask=null}}});Ext.define("Ext.layout.component.field.TextArea",{extend:Ext.layout.component.field.Text,alias:"layout.textareafield",type:"textareafield",canGrowWidth:false,naturalSizingProp:"cols",beginLayout:function(a){this.callParent(arguments);a.target.inputEl.setStyle("height","")},measureContentHeight:function(b){var e=this,a=e.owner,k=e.callParent(arguments),c,i,h,g,d,j;if(a.grow&&!b.state.growHandled){c=b.inputContext;i=a.inputEl;d=i.getWidth(true);h=Ext.util.Format.htmlEncode(i.dom.value)||"&#160;";h+=a.growAppend;h=h.replace(/\n/g,"<br/>");j=Ext.util.TextMetrics.measure(i,h,d).height+c.getBorderInfo().height+c.getPaddingInfo().height;j=Ext.Number.constrain(j,a.growMin,a.growMax);c.setHeight(j);b.state.growHandled=true;c.domBlock(e,"height");k=NaN}return k}});Ext.define("Ext.form.field.TextArea",{extend:Ext.form.field.Text,alias:["widget.textareafield","widget.textarea"],alternateClassName:"Ext.form.TextArea",fieldSubTpl:['<textarea id="{id}" {inputAttrTpl}','<tpl if="name"> name="{name}"</tpl>','<tpl if="rows"> rows="{rows}" </tpl>','<tpl if="cols"> cols="{cols}" </tpl>','<tpl if="placeholder"> placeholder="{placeholder}"</tpl>','<tpl if="size"> size="{size}"</tpl>','<tpl if="maxLength !== undefined"> maxlength="{maxLength}"</tpl>','<tpl if="readOnly"> readonly="readonly"</tpl>','<tpl if="disabled"> disabled="disabled"</tpl>','<tpl if="tabIdx"> tabIndex="{tabIdx}"</tpl>',' class="{fieldCls} {typeCls} {inputCls}" ','<tpl if="fieldStyle"> style="{fieldStyle}"</tpl>',' autocomplete="off">\n','<tpl if="value">{[Ext.util.Format.htmlEncode(values.value)]}</tpl>',"</textarea>",{disableFormats:true}],growMin:60,growMax:1000,growAppend:"\n-",cols:20,rows:4,enterIsSpecial:false,preventScrollbars:false,componentLayout:"textareafield",setGrowSizePolicy:Ext.emptyFn,returnRe:/\r/g,inputCls:Ext.baseCSSPrefix+"form-textarea",getSubTplData:function(){var c=this,b=c.getFieldStyle(),a=c.callParent();if(c.grow){if(c.preventScrollbars){a.fieldStyle=(b||"")+";overflow:hidden;height:"+c.growMin+"px"}}Ext.applyIf(a,{cols:c.cols,rows:c.rows});return a},afterRender:function(){var a=this;a.callParent(arguments);a.needsMaxCheck=a.enforceMaxLength&&a.maxLength!==Number.MAX_VALUE&&!Ext.supports.TextAreaMaxLength;if(a.needsMaxCheck){a.inputEl.on("paste",a.onPaste,a)}},transformRawValue:function(a){return this.stripReturns(a)},transformOriginalValue:function(a){return this.stripReturns(a)},getValue:function(){return this.stripReturns(this.callParent())},valueToRaw:function(a){a=this.stripReturns(a);return this.callParent([a])},stripReturns:function(a){if(a){a=a.replace(this.returnRe,"")}return a},onPaste:function(b){var a=this;if(!a.pasteTask){a.pasteTask=new Ext.util.DelayedTask(a.pasteCheck,a)}a.pasteTask.delay(1)},pasteCheck:function(){var b=this,c=b.getValue(),a=b.maxLength;if(c.length>a){c=c.substr(0,a);b.setValue(c)}},fireKey:function(d){var b=this,a=d.getKey(),c;if(d.isSpecialKey()&&(b.enterIsSpecial||(a!==d.ENTER||d.hasModifier()))){b.fireEvent("specialkey",b,d)}if(b.needsMaxCheck&&a!==d.BACKSPACE&&a!==d.DELETE&&!d.isNavKeyPress()&&!b.isCutCopyPasteSelectAll(d,a)){c=b.getValue();if(c.length>=b.maxLength){d.stopEvent()}}},isCutCopyPasteSelectAll:function(b,a){if(b.ctrlKey){return a===b.A||a===b.C||a===b.V||a===b.X}return false},autoSize:function(){var b=this,a;if(b.grow&&b.rendered){b.updateLayout();a=b.inputEl.getHeight();if(a!==b.lastInputHeight){b.fireEvent("autosize",b,a);b.lastInputHeight=a}}},initAria:function(){this.callParent(arguments);this.getActionEl().dom.setAttribute("aria-multiline",true)},beforeDestroy:function(){var a=this.pasteTask;if(a){a.cancel();this.pasteTask=null}this.callParent()}});Ext.define("Ext.form.field.Display",{extend:Ext.form.field.Base,alias:"widget.displayfield",alternateClassName:["Ext.form.DisplayField","Ext.form.Display"],fieldSubTpl:['<div id="{id}"','<tpl if="fieldStyle"> style="{fieldStyle}"</tpl>',' class="{fieldCls}">{value}</div>',{compiled:true,disableFormats:true}],fieldCls:Ext.baseCSSPrefix+"form-display-field",htmlEncode:false,validateOnChange:false,initEvents:Ext.emptyFn,submitValue:false,isDirty:function(){return false},isValid:function(){return true},validate:function(){return true},getRawValue:function(){return this.rawValue},setRawValue:function(b){var a=this,c;b=Ext.value(b,"");a.rawValue=b;if(a.rendered){a.inputEl.dom.innerHTML=a.getDisplayValue();a.updateLayout()}return b},getDisplayValue:function(){var a=this,b=this.getRawValue(),c;if(a.renderer){c=a.renderer.call(a.scope||a,b,a)}else{c=a.htmlEncode?Ext.util.Format.htmlEncode(b):b}return c},getSubTplData:function(){var a=this.callParent(arguments);a.value=this.getDisplayValue();return a}});Ext.define("Ext.layout.container.Anchor",{alias:"layout.anchor",extend:Ext.layout.container.Auto,alternateClassName:"Ext.layout.AnchorLayout",type:"anchor",defaultAnchor:"100%",parseAnchorRE:/^(r|right|b|bottom)$/i,manageOverflow:true,beginLayoutCycle:function(c){var j=this,a=0,g,k,e,d,b,h;j.callParent(arguments);e=c.childItems;b=e.length;for(d=0;d<b;++d){k=e[d];g=k.target.anchorSpec;if(g){if(k.widthModel.calculated&&g.right){a|=1}if(k.heightModel.calculated&&g.bottom){a|=2}if(a==3){break}}}c.anchorDimensions=a},calculateItems:function(h,a){var q=this,l=h.childItems,g=l.length,o=a.gotHeight,j=a.gotWidth,e=a.height,c=a.width,b=(j?1:0)|(o?2:0),p=h.anchorDimensions,m,s,n,r,k,d;if(!p){return true}for(k=0;k<g;k++){s=l[k];n=s.getMarginInfo();m=s.target.anchorSpec;if(j&&s.widthModel.calculated){d=m.right(c)-n.width;d=q.adjustWidthAnchor(d,s);s.setWidth(d)}if(o&&s.heightModel.calculated){r=m.bottom(e)-n.height;r=q.adjustHeightAnchor(r,s);s.setHeight(r)}}return(b&p)===p},anchorFactory:{offset:function(a){return function(b){return b+a}},ratio:function(a){return function(b){return Math.floor(b*a)}},standard:function(a){return function(b){return b-a}}},parseAnchor:function(c,g,b){if(c&&c!="none"){var d=this.anchorFactory,e;if(this.parseAnchorRE.test(c)){return d.standard(b-g)}if(c.indexOf("%")!=-1){return d.ratio(parseFloat(c.replace("%",""))*0.01)}e=parseInt(c,10);if(!isNaN(e)){return d.offset(e)}}return null},adjustWidthAnchor:function(b,a){return b},adjustHeightAnchor:function(b,a){return b},configureItem:function(g){var e=this,a=e.owner,d=g.anchor,b,c,h;e.callParent(arguments);if(!g.anchor&&g.items&&!Ext.isNumber(g.width)&&!(Ext.isIE6&&Ext.isStrict)){g.anchor=d=e.defaultAnchor}if(a.anchorSize){if(typeof a.anchorSize=="number"){c=a.anchorSize}else{c=a.anchorSize.width;h=a.anchorSize.height}}else{c=a.initialConfig.width;h=a.initialConfig.height}if(d){b=d.split(" ");g.anchorSpec={right:e.parseAnchor(b[0],g.initialConfig.width,c),bottom:e.parseAnchor(b[1],g.initialConfig.height,h)}}},sizePolicy:{$:{readsWidth:1,readsHeight:1,setsWidth:0,setsHeight:0},b:{readsWidth:1,readsHeight:0,setsWidth:0,setsHeight:1},r:{$:{readsWidth:0,readsHeight:1,setsWidth:1,setsHeight:0},b:{readsWidth:0,readsHeight:0,setsWidth:1,setsHeight:1}}},getItemSizePolicy:function(c){var e=c.anchorSpec,a="$",d=this.sizePolicy,b;if(e){b=this.owner.getSizeModel();if(e.right&&!b.width.shrinkWrap){d=d.r}if(e.bottom&&!b.height.shrinkWrap){a="b"}}return d[a]}});Ext.define("Ext.window.MessageBox",{extend:Ext.window.Window,alias:"widget.messagebox",OK:1,YES:2,NO:4,CANCEL:8,OKCANCEL:9,YESNO:6,YESNOCANCEL:14,INFO:Ext.baseCSSPrefix+"message-box-info",WARNING:Ext.baseCSSPrefix+"message-box-warning",QUESTION:Ext.baseCSSPrefix+"message-box-question",ERROR:Ext.baseCSSPrefix+"message-box-error",hideMode:"offsets",closeAction:"hide",resizable:false,title:"&#160;",defaultMinWidth:250,defaultMaxWidth:600,defaultMinHeight:110,defaultMaxHeight:500,constrain:true,cls:[Ext.baseCSSPrefix+"message-box",Ext.baseCSSPrefix+"hide-offsets"],layout:{type:"vbox",align:"stretch"},shrinkWrapDock:true,defaultTextHeight:75,minProgressWidth:250,minPromptWidth:250,buttonText:{ok:"OK",yes:"Yes",no:"No",cancel:"Cancel"},buttonIds:["ok","yes","no","cancel"],titleText:{confirm:"Confirm",prompt:"Prompt",wait:"Loading...",alert:"Attention"},iconHeight:35,iconWidth:50,makeButton:function(a){var b=this.buttonIds[a];return new Ext.button.Button({handler:this.btnCallback,itemId:b,scope:this,text:this.buttonText[b],minWidth:75})},btnCallback:function(a){var b=this,c,d;if(b.cfg.prompt||b.cfg.multiline){if(b.cfg.multiline){d=b.textArea}else{d=b.textField}c=d.getValue();d.reset()}a.blur();b.hide();b.userCallback(a.itemId,c,b.cfg)},hide:function(){var b=this,a=b.cfg.cls;b.dd.endDrag();b.progressBar.reset();if(a){b.removeCls(a)}b.callParent(arguments)},initComponent:function(){var d=this,a=d.id,c,b;d.title="&#160;";d.minWidth=d.defaultMinWidth;d.maxWidth=d.defaultMaxWidth;d.minHeight=d.defaultMinHeight;d.maxHeight=d.defaultMaxHeight;d.topContainer=new Ext.container.Container({layout:"hbox",padding:10,style:{overflow:"hidden"},items:[d.iconComponent=new Ext.Component({width:d.iconWidth,height:d.iconHeight}),d.promptContainer=new Ext.container.Container({flex:1,layout:"anchor",items:[d.msg=new Ext.form.field.Display({id:a+"-displayfield",cls:d.baseCls+"-text"}),d.textField=new Ext.form.field.Text({id:a+"-textfield",anchor:"100%",enableKeyEvents:true,listeners:{keydown:d.onPromptKey,scope:d}}),d.textArea=new Ext.form.field.TextArea({id:a+"-textarea",anchor:"100%",height:75})]})]});d.progressBar=new Ext.ProgressBar({id:a+"-progressbar",margins:"0 10 10 10"});d.items=[d.topContainer,d.progressBar];d.msgButtons=[];for(c=0;c<4;c++){b=d.makeButton(c);d.msgButtons[b.itemId]=b;d.msgButtons.push(b)}d.bottomTb=new Ext.toolbar.Toolbar({id:a+"-toolbar",ui:"footer",dock:"bottom",layout:{pack:"center"},items:[d.msgButtons[0],d.msgButtons[1],d.msgButtons[2],d.msgButtons[3]]});d.dockedItems=[d.bottomTb];d.on("close",d.onClose,d);d.callParent()},onClose:function(){var a=this.header.child("[type=close]");a.itemId="cancel";this.btnCallback(a);delete a.itemId},onPromptKey:function(a,c){var b=this,d;if(c.keyCode===Ext.EventObject.RETURN||c.keyCode===10){if(b.msgButtons.ok.isVisible()){d=true;b.msgButtons.ok.handler.call(b,b.msgButtons.ok)}else{if(b.msgButtons.yes.isVisible()){b.msgButtons.yes.handler.call(b,b.msgButtons.yes);d=true}}if(d){b.textField.blur()}}},reconfigure:function(l){var m=this,n=0,j=true,a=m.buttonText,b,o,h,c,g,e,k,d;m.updateButtonText();l=l||{};m.cfg=l;if(l.width){b=l.width}if(l.height){o=l.height}m.minWidth=l.minWidth||m.defaultMinWidth;m.maxWidth=l.maxWidth||m.defaultMaxWidth;m.minHeight=l.minHeight||m.defaultMinHeight;m.maxHeight=l.maxHeight||m.defaultMaxHeight;delete m.defaultFocus;if(l.defaultFocus){m.defaultFocus=l.defaultFocus}m.animateTarget=l.animateTarget||undefined;m.modal=l.modal!==false;m.setTitle(l.title||"");m.setIconCls(l.iconCls||"");if(Ext.isObject(l.buttons)){m.buttonText=l.buttons;n=0}else{m.buttonText=l.buttonText||m.buttonText;n=Ext.isNumber(l.buttons)?l.buttons:0}n=n|m.updateButtonText();m.buttonText=a;Ext.suspendLayouts();delete m.width;delete m.height;if(b||o){if(b){m.setWidth(b)}if(o){m.setHeight(o)}}m.hidden=false;if(!m.rendered){m.render(Ext.getBody())}m.closable=l.closable!==false&&!l.wait;m.header.child("[type=close]").setVisible(m.closable);if(!l.title&&!m.closable&&!l.iconCls){m.header.hide()}else{m.header.show()}m.liveDrag=!l.proxyDrag;m.userCallback=Ext.Function.bind(l.callback||l.fn||Ext.emptyFn,l.scope||Ext.global);m.setIcon(l.icon,l.iconWidth,l.iconHeight);e=m.msg;if(l.msg){e.setValue(l.msg);e.show()}else{e.hide()}c=m.textArea;g=m.textField;if(l.prompt||l.multiline){m.multiline=l.multiline;if(l.multiline){c.setValue(l.value);c.setHeight(l.defaultTextHeight||m.defaultTextHeight);c.show();g.hide();m.defaultFocus=c}else{g.setValue(l.value);c.hide();g.show();m.defaultFocus=g}}else{c.hide();g.hide()}k=m.progressBar;if(l.progress||l.wait){k.show();m.updateProgress(0,l.progressText);if(l.wait===true){k.wait(l.waitConfig)}}else{k.hide()}d=m.msgButtons;for(h=0;h<4;h++){if(n&Math.pow(2,h)){if(!m.defaultFocus){m.defaultFocus=d[h]}d[h].show();j=false}else{d[h].hide()}}if(j){m.bottomTb.hide()}else{m.bottomTb.show()}Ext.resumeLayouts(true)},updateButtonText:function(){var d=this,c=d.buttonText,b=0,e,a;for(e in c){if(c.hasOwnProperty(e)){a=d.msgButtons[e];if(a){if(d.cfg&&d.cfg.buttonText){b=b|Math.pow(2,Ext.Array.indexOf(d.buttonIds,e))}if(a.text!=c[e]){a.setText(c[e])}}}}return b},show:function(a){var c=this,b;if(Ext.AbstractComponent.layoutSuspendCount){Ext.on({resumelayouts:function(){c.show(a)},single:true});return c}c.reconfigure(a);if(a.cls){c.addCls(a.cls)}b=c.query("textfield:not([hidden]),textarea:not([hidden]),button:not([hidden])");c.preventFocusOnActivate=!b.length;c.hidden=true;c.callParent();return c},onShow:function(){this.callParent(arguments);this.center()},updateText:function(a){this.msg.setValue(a)},setIcon:function(d,c,a){var e=this,g=e.iconComponent,b=e.messageIconCls;if(b){g.removeCls(b)}if(d){g.show();g.setSize(c||e.iconWidth,a||e.iconHeight);g.addCls(Ext.baseCSSPrefix+"dlg-icon");g.addCls(e.messageIconCls=d)}else{g.removeCls(Ext.baseCSSPrefix+"dlg-icon");g.hide()}return e},updateProgress:function(b,a,c){this.progressBar.updateProgress(b,a);if(c){this.updateText(c)}return this},onEsc:function(){if(this.closable!==false){this.callParent(arguments)}},confirm:function(a,d,c,b){if(Ext.isString(a)){a={title:a,icon:this.QUESTION,msg:d,buttons:this.YESNO,callback:c,scope:b}}return this.show(a)},prompt:function(b,g,d,c,a,e){if(Ext.isString(b)){b={prompt:true,title:b,minWidth:this.minPromptWidth,msg:g,buttons:this.OKCANCEL,callback:d,scope:c,multiline:a,value:e}}return this.show(b)},wait:function(a,c,b){if(Ext.isString(a)){a={title:c,msg:a,closable:false,wait:true,modal:true,minWidth:this.minProgressWidth,waitConfig:b}}return this.show(a)},alert:function(a,d,c,b){if(Ext.isString(a)){a={title:a,msg:d,buttons:this.OK,fn:c,scope:b,minWidth:this.minWidth}}return this.show(a)},progress:function(a,c,b){if(Ext.isString(a)){a={title:a,msg:c,progress:true,progressText:b}}return this.show(a)}},function(){Ext.MessageBox=Ext.Msg=new this()});Ext.define("Ext.form.Basic",{extend:Ext.util.Observable,alternateClassName:"Ext.form.BasicForm",constructor:function(b,c){var g=this,a,e,d;g.owner=b;g.checkValidityTask=new Ext.util.DelayedTask(g.checkValidity,g);g.checkDirtyTask=new Ext.util.DelayedTask(g.checkDirty,g);g.monitor=new Ext.container.Monitor({selector:"[isFormField]",scope:g,addHandler:g.onFieldAdd,removeHandler:g.onFieldRemove});g.monitor.bind(b);Ext.apply(g,c);if(Ext.isString(g.paramOrder)){g.paramOrder=g.paramOrder.split(/[\s,|]/)}if(g.api){e=g.api=Ext.apply({},g.api);for(d in e){if(e.hasOwnProperty(d)){e[d]=Ext.direct.Manager.parseMethod(e[d])}}}a=g.reader;if(a&&!a.isReader){if(typeof a==="string"){a={type:a}}g.reader=Ext.createByAlias("reader."+a.type,a)}a=g.errorReader;if(a&&!a.isReader){if(typeof a==="string"){a={type:a}}g.errorReader=Ext.createByAlias("reader."+a.type,a)}g.addEvents("beforeaction","actionfailed","actioncomplete","validitychange","dirtychange");g.callParent()},initialize:function(){this.initialized=true;this.onValidityChange(!this.hasInvalidField())},timeout:30,paramsAsHash:false,waitTitle:"Please Wait...",trackResetOnLoad:false,wasDirty:false,destroy:function(){var b=this,a=b.monitor;if(a){a.unbind();b.monitor=null}b.clearListeners();b.checkValidityTask.cancel();b.checkDirtyTask.cancel()},onFieldAdd:function(b){var a=this;a.mon(b,"validitychange",a.checkValidityDelay,a);a.mon(b,"dirtychange",a.checkDirtyDelay,a);if(a.initialized){a.checkValidityDelay()}},onFieldRemove:function(b){var a=this;a.mun(b,"validitychange",a.checkValidityDelay,a);a.mun(b,"dirtychange",a.checkDirtyDelay,a);if(a.initialized){a.checkValidityDelay()}},getFields:function(){return this.monitor.getItems()},getBoundItems:function(){var a=this._boundItems;if(!a||a.getCount()===0){a=this._boundItems=new Ext.util.MixedCollection();a.addAll(this.owner.query("[formBind]"))}return a},hasInvalidField:function(){return !!this.getFields().findBy(function(c){var a=c.preventMark,b;c.preventMark=true;b=c.isValid();c.preventMark=a;return !b})},isValid:function(){var a=this,b;Ext.suspendLayouts();b=a.getFields().filterBy(function(c){return !c.validate()});Ext.resumeLayouts(true);return b.length<1},checkValidity:function(){var b=this,a=!b.hasInvalidField();if(a!==b.wasValid){b.onValidityChange(a);b.fireEvent("validitychange",b,a);b.wasValid=a}},checkValidityDelay:function(){this.checkValidityTask.delay(10)},onValidityChange:function(g){var d=this.getBoundItems(),b,c,a,e;if(d){b=d.items;a=b.length;for(c=0;c<a;c++){e=b[c];if(e.disabled===g){e.setDisabled(!g)}}}},isDirty:function(){return !!this.getFields().findBy(function(a){return a.isDirty()})},checkDirtyDelay:function(){this.checkDirtyTask.delay(10)},checkDirty:function(){var a=this.isDirty();if(a!==this.wasDirty){this.fireEvent("dirtychange",this,a);this.wasDirty=a}},hasUpload:function(){return !!this.getFields().findBy(function(a){return a.isFileUpload()})},doAction:function(b,a){if(Ext.isString(b)){b=Ext.ClassManager.instantiateByAlias("formaction."+b,Ext.apply({},a,{form:this}))}if(this.fireEvent("beforeaction",this,b)!==false){this.beforeAction(b);Ext.defer(b.run,100,b)}return this},submit:function(a){a=a||{};var b=this,c;if(a.standardSubmit||b.standardSubmit){c="standardsubmit"}else{c=b.api?"directsubmit":"submit"}return b.doAction(c,a)},load:function(a){return this.doAction(this.api?"directload":"load",a)},updateRecord:function(c){c=c||this._record;if(!c){return this}var b=c.fields.items,d=this.getFieldValues(),h={},g=0,a=b.length,e;for(;g<a;++g){e=b[g].name;if(d.hasOwnProperty(e)){h[e]=d[e]}}c.beginEdit();c.set(h);c.endEdit();return this},loadRecord:function(a){this._record=a;return this.setValues(a.getData())},getRecord:function(){return this._record},beforeAction:function(c){var g=this,b=c.waitMsg,j=Ext.baseCSSPrefix+"mask-loading",d=g.getFields().items,e,i=d.length,h,a;for(e=0;e<i;e++){h=d[e];if(h.isFormField&&h.syncValue){h.syncValue()}}if(b){a=g.waitMsgTarget;if(a===true){g.owner.el.mask(b,j)}else{if(a){a=g.waitMsgTarget=Ext.get(a);a.mask(b,j)}else{g.floatingAncestor=g.owner.up("[floating]");if(g.floatingAncestor){g.savePreventFocusOnActivate=g.floatingAncestor.preventFocusOnActivate;g.floatingAncestor.preventFocusOnActivate=true}Ext.MessageBox.wait(b,c.waitTitle||g.waitTitle)}}}},afterAction:function(c,e){var a=this;if(c.waitMsg){var b=Ext.MessageBox,d=a.waitMsgTarget;if(d===true){a.owner.el.unmask()}else{if(d){d.unmask()}else{b.hide()}}}if(a.floatingAncestor){a.floatingAncestor.preventFocusOnActivate=a.savePreventFocusOnActivate}if(e){if(c.reset){a.reset()}Ext.callback(c.success,c.scope||c,[a,c]);a.fireEvent("actioncomplete",a,c)}else{Ext.callback(c.failure,c.scope||c,[a,c]);a.fireEvent("actionfailed",a,c)}},findField:function(a){return this.getFields().findBy(function(b){return b.id===a||b.getName()===a})},markInvalid:function(j){var d=this,h,a,b,g,c;function i(e,l){var k=d.findField(e);if(k){k.markInvalid(l)}}if(Ext.isArray(j)){a=j.length;for(h=0;h<a;h++){b=j[h];i(b.id,b.msg)}}else{if(j instanceof Ext.data.Errors){a=j.items.length;for(h=0;h<a;h++){b=j.items[h];i(b.field,b.message)}}else{for(c in j){if(j.hasOwnProperty(c)){g=j[c];i(c,g,j)}}}}return this},setValues:function(b){var d=this,a,c,h,g;function e(i,k){var j=d.findField(i);if(j){j.setValue(k);if(d.trackResetOnLoad){j.resetOriginalValue()}}}Ext.suspendLayouts();if(Ext.isArray(b)){c=b.length;for(a=0;a<c;a++){h=b[a];e(h.id,h.value)}}else{Ext.iterate(b,e)}Ext.resumeLayouts(true);return this},getValues:function(i,j,n,l){var m={},g=this.getFields().items,h,o=g.length,e=Ext.isArray,k,d,c,b,a;for(h=0;h<o;h++){k=g[h];if(!j||k.isDirty()){d=k[l?"getModelData":"getSubmitData"](n);if(Ext.isObject(d)){for(a in d){if(d.hasOwnProperty(a)){c=d[a];if(n&&c===""){c=k.emptyText||""}if(m.hasOwnProperty(a)){b=m[a];if(!e(b)){b=m[a]=[b]}if(e(c)){m[a]=b.concat(c)}else{b.push(c)}}else{m[a]=c}}}}}}if(i){m=Ext.Object.toQueryString(m)}return m},getFieldValues:function(a){return this.getValues(false,a,false,true)},clearInvalid:function(){Ext.suspendLayouts();var b=this,a=b.getFields().items,c,d=a.length;for(c=0;c<d;c++){a[c].clearInvalid()}Ext.resumeLayouts(true);return b},reset:function(b){Ext.suspendLayouts();var c=this,a=c.getFields().items,d,e=a.length;for(d=0;d<e;d++){a[d].reset()}Ext.resumeLayouts(true);if(b===true){delete c._record}return c},applyToFields:function(c){var a=this.getFields().items,b,d=a.length;for(b=0;b<d;b++){Ext.apply(a[b],c)}return this},applyIfToFields:function(c){var a=this.getFields().items,b,d=a.length;for(b=0;b<d;b++){Ext.applyIf(a[b],c)}return this}});Ext.define("Ext.form.FieldAncestor",{xhooks:{initHierarchyState:function(a){if(this.fieldDefaults){if(a.fieldDefaults){a.fieldDefaults=Ext.apply(Ext.Object.chain(a.fieldDefaults),this.fieldDefaults)}else{a.fieldDefaults=this.fieldDefaults}}}},initFieldAncestor:function(){var a=this;a.addEvents("fieldvaliditychange","fielderrorchange");a.monitor=new Ext.container.Monitor({scope:a,addHandler:a.onChildFieldAdd,removeHandler:a.onChildFieldRemove});a.initFieldDefaults()},initMonitor:function(){this.monitor.bind(this)},onChildFieldAdd:function(b){var a=this;a.mon(b,"errorchange",a.handleFieldErrorChange,a);a.mon(b,"validitychange",a.handleFieldValidityChange,a)},onChildFieldRemove:function(b){var a=this;a.mun(b,"errorchange",a.handleFieldErrorChange,a);a.mun(b,"validitychange",a.handleFieldValidityChange,a)},initFieldDefaults:function(){if(!this.fieldDefaults){this.fieldDefaults={}}},handleFieldValidityChange:function(c,b){var a=this;if(c!==a){a.fireEvent("fieldvaliditychange",a,c,b);a.onFieldValidityChange(c,b)}},handleFieldErrorChange:function(b,a){var c=this;if(b!==c){c.fireEvent("fielderrorchange",c,b,a);c.onFieldErrorChange(b,a)}},onFieldValidityChange:Ext.emptyFn,onFieldErrorChange:Ext.emptyFn,beforeDestroy:function(){this.monitor.unbind();this.callParent()}});Ext.define("Ext.layout.component.field.FieldContainer",{extend:Ext.layout.component.field.Field,alias:"layout.fieldcontainer",type:"fieldcontainer",waitForOuterHeightInDom:true,waitForOuterWidthInDom:true,beginLayout:function(b){var a=this.owner;this.callParent(arguments);b.hasRawContent=true;a.bodyEl.setStyle("height","");a.containerEl.setStyle("height","");b.containerElContext=b.getEl("containerEl")},measureContentHeight:function(a){return a.hasDomProp("containerLayoutDone")?this.callParent(arguments):NaN},measureContentWidth:function(a){return a.hasDomProp("containerLayoutDone")?this.callParent(arguments):NaN},publishInnerWidth:function(c,b){var d=c.bodyCellContext,a=d.el.getWidth();d.setWidth(a,false);c.containerElContext.setWidth(a,false)},publishInnerHeight:function(b,a){var c=b.bodyCellContext,d=b.containerElContext;a-=this.measureLabelErrorHeight(b);c.setHeight(a);d.setHeight(a)}});Ext.define("Ext.form.FieldContainer",{extend:Ext.container.Container,mixins:{labelable:Ext.form.Labelable,fieldAncestor:Ext.form.FieldAncestor},alias:"widget.fieldcontainer",componentLayout:"fieldcontainer",componentCls:Ext.baseCSSPrefix+"form-fieldcontainer",customOverflowEl:"containerEl",childEls:["containerEl"],combineLabels:false,labelConnector:", ",combineErrors:false,maskOnDisable:false,fieldSubTpl:'<div id="{id}-containerEl" class="{containerElCls}">{%this.renderContainer(out,values)%}</div>',initComponent:function(){var a=this;a.initLabelable();a.initFieldAncestor();a.callParent();a.initMonitor()},getOverflowEl:function(){return this.containerEl},onAdd:function(a){var b=this;if(Ext.isGecko&&b.layout.type==="absolute"&&!b.hideLabel&&b.labelAlign!=="top"){a.x+=(b.labelWidth+b.labelPad)}b.callParent(arguments);b.updateLabel()},onRemove:function(a,b){var c=this;c.callParent(arguments);if(!b){c.updateLabel()}},initRenderTpl:function(){var a=this;if(!a.hasOwnProperty("renderTpl")){a.renderTpl=a.getTpl("labelableRenderTpl")}return a.callParent()},initRenderData:function(){var a=this,b=a.callParent();b.containerElCls=a.containerElCls;return Ext.applyIf(b,a.getLabelableRenderData())},getFieldLabel:function(){var a=this.fieldLabel||"";if(!a&&this.combineLabels){a=Ext.Array.map(this.query("[isFieldLabelable]"),function(b){return b.getFieldLabel()}).join(this.labelConnector)}return a},getSubTplData:function(){var a=this.initRenderData();Ext.apply(a,this.subTplData);return a},getSubTplMarkup:function(){var c=this,a=c.getTpl("fieldSubTpl"),b;if(!a.renderContent){c.setupRenderTpl(a)}b=a.apply(c.getSubTplData());return b},updateLabel:function(){var b=this,a=b.labelEl;if(a){b.setFieldLabel(b.getFieldLabel())}},onFieldErrorChange:function(e,b){if(this.combineErrors){var d=this,g=d.getActiveError(),c=Ext.Array.filter(d.query("[isFormField]"),function(h){return h.hasActiveError()}),a=d.getCombinedErrors(c);if(a){d.setActiveErrors(a)}else{d.unsetActiveError()}if(g!==d.getActiveError()){d.doComponentLayout()}}},getCombinedErrors:function(e){var k=[],c,l=e.length,i,d,j,b,g,h;for(c=0;c<l;c++){i=e[c];d=i.getActiveErrors();b=d.length;for(j=0;j<b;j++){g=d[j];h=i.getFieldLabel();k.push((h?h+": ":"")+g)}}return k},getTargetEl:function(){return this.containerEl},applyTargetCls:function(b){var a=this.containerElCls;this.containerElCls=a?a+" "+b:b}});Ext.define("Ext.layout.container.CheckboxGroup",{extend:Ext.layout.container.Container,alias:["layout.checkboxgroup"],autoFlex:true,type:"checkboxgroup",createsInnerCt:true,childEls:["innerCt"],renderTpl:['<table id="{ownerId}-innerCt" class="'+Ext.baseCSSPrefix+'table-plain" cellpadding="0"','role="presentation" style="{tableStyle}"><tbody><tr>','<tpl for="columns">','<td class="{parent.colCls}" valign="top" style="{style}">',"{% this.renderColumn(out,parent,xindex-1) %}","</td>","</tpl>","</tr></tbody></table>"],lastOwnerItemsGeneration:null,beginLayout:function(b){var k=this,e,d,h,a,j,g=0,m=0,l=k.autoFlex,c=k.innerCt.dom.style;k.callParent(arguments);e=k.columnNodes;b.innerCtContext=b.getEl("innerCt",k);if(!b.widthModel.shrinkWrap){d=e.length;if(k.columnsArray){for(h=0;h<d;h++){a=k.owner.columns[h];if(a<1){g+=a;m++}}for(h=0;h<d;h++){a=k.owner.columns[h];if(a<1){j=((a/g)*100)+"%"}else{j=a+"px"}e[h].style.width=j}}else{for(h=0;h<d;h++){j=l?(1/d*100)+"%":"";e[h].style.width=j;m++}}if(!m){c.tableLayout="fixed";c.width=""}else{if(m<d){c.tableLayout="fixed";c.width="100%"}else{c.tableLayout="auto";if(l){c.width="100%"}else{c.width=""}}}}else{c.tableLayout="auto";c.width=""}},cacheElements:function(){var a=this;a.callParent();a.rowEl=a.innerCt.down("tr");a.columnNodes=a.rowEl.dom.childNodes},calculate:function(h){var e=this,c,b,a,i,d,g;if(!h.getDomProp("containerChildrenSizeDone")){e.done=false}else{c=h.innerCtContext;b=h.widthModel.shrinkWrap;a=h.heightModel.shrinkWrap;i=a||b;d=c.el.dom;g=i&&c.getPaddingInfo();if(b){h.setContentWidth(d.offsetWidth+g.width,true)}if(a){h.setContentHeight(d.offsetHeight+g.height,true)}}},doRenderColumn:function(d,l,g){var i=l.$layout,c=i.owner,e=l.columnCount,h=c.items.items,b=h.length,m,a,j,k,n;if(c.vertical){j=Math.ceil(b/e);a=g*j;b=Math.min(b,a+j);k=1}else{a=g;k=e}for(;a<b;a+=k){m=h[a];i.configureItem(m);n=m.getRenderTree();Ext.DomHelper.generateMarkup(n,d)}},getColumnCount:function(){var b=this,a=b.owner,c=a.columns;if(b.columnsArray){return c.length}if(Ext.isNumber(c)){return c}return a.items.length},getItemSizePolicy:function(a){return this.autoSizePolicy},getRenderData:function(){var k=this,g=k.callParent(),b=k.owner,h,d=k.getColumnCount(),a,c,j,l=k.autoFlex,e=0,m=0;if(k.columnsArray){for(h=0;h<d;h++){a=k.owner.columns[h];if(a<1){e+=a;m++}}}g.colCls=b.groupCls;g.columnCount=d;g.columns=[];for(h=0;h<d;h++){c=(g.columns[h]={});if(k.columnsArray){a=k.owner.columns[h];if(a<1){j=((a/e)*100)+"%"}else{j=a+"px"}c.style="width:"+j}else{c.style="width:"+(1/d*100)+"%";m++}}g.tableStyle=!m?"table-layout:fixed;":(m<d)?"table-layout:fixed;width:100%":(l)?"table-layout:auto;width:100%":"table-layout:auto;";return g},initLayout:function(){var b=this,a=b.owner;b.columnsArray=Ext.isArray(a.columns);b.autoColumns=!a.columns||a.columns==="auto";b.vertical=a.vertical;b.callParent()},isValidParent:function(){return true},setupRenderTpl:function(a){this.callParent(arguments);a.renderColumn=this.doRenderColumn},renderChildren:function(){var a=this,b=a.owner.items.generation;if(a.lastOwnerItemsGeneration!==b){a.lastOwnerItemsGeneration=b;a.renderItems(a.getLayoutItems())}},renderItems:function(e){var g=this,a=e.length,b,k,j,d,h,c;if(a){Ext.suspendLayouts();if(g.autoColumns){g.addMissingColumns(a)}d=g.columnNodes.length;j=Math.ceil(a/d);for(b=0;b<a;b++){k=e[b];h=g.getRenderRowIndex(b,j,d);c=g.getRenderColumnIndex(b,j,d);if(!k.rendered){g.renderItem(k,h,c)}else{if(!g.isItemAtPosition(k,h,c)){g.moveItem(k,h,c)}}}if(g.autoColumns){g.removeExceedingColumns(a)}Ext.resumeLayouts(true)}},isItemAtPosition:function(b,c,a){return b.el.dom===this.getNodeAt(c,a)},getRenderColumnIndex:function(b,a,c){if(this.vertical){return Math.floor(b/a)}else{return b%c}},getRenderRowIndex:function(b,a,d){var c=this;if(c.vertical){return b%a}else{return Math.floor(b/d)}},getNodeAt:function(b,a){return this.columnNodes[a].childNodes[b]},addMissingColumns:function(a){var g=this,c=g.columnNodes.length,e,h,b,d;if(c<a){e=a-c;h=g.rowEl;b=g.owner.groupCls;for(d=0;d<e;d++){h.createChild({cls:b,tag:"td",vAlign:"top"})}}},removeExceedingColumns:function(a){var e=this,b=e.columnNodes.length,d,g,c;if(b>a){d=b-a;g=e.rowEl;for(c=0;c<d;c++){g.last().remove()}}},renderItem:function(c,d,a){var b=this;b.configureItem(c);c.render(Ext.get(b.columnNodes[a]),d);b.afterRenderItem(c)},moveItem:function(d,g,b){var c=this,a=c.columnNodes[b],e=a.childNodes[g];a.insertBefore(d.el.dom,e||null)}});Ext.define("Ext.form.CheckboxGroup",{extend:Ext.form.FieldContainer,mixins:{field:Ext.form.field.Field},alias:"widget.checkboxgroup",columns:"auto",vertical:false,allowBlank:true,blankText:"You must select at least one item in this group",defaultType:"checkboxfield",groupCls:Ext.baseCSSPrefix+"form-check-group",fieldBodyCls:Ext.baseCSSPrefix+"form-checkboxgroup-body",layout:"checkboxgroup",componentCls:Ext.baseCSSPrefix+"form-checkboxgroup",initComponent:function(){var a=this;a.callParent();a.initField()},initValue:function(){var b=this,a=b.value;b.originalValue=b.lastValue=a||b.getValue();if(a){b.setValue(a)}},onAdd:function(e){var d=this,b,a,c;if(e.isCheckbox){d.mon(e,"change",d.checkChange,d)}else{if(e.isContainer){b=e.items.items;for(c=0,a=b.length;c<a;c++){d.onAdd(b[c])}}}d.callParent(arguments)},onRemove:function(e){var d=this,b,a,c;if(e.isCheckbox){d.mun(e,"change",d.checkChange,d)}else{if(e.isContainer){b=e.items.items;for(c=0,a=b.length;c<a;c++){d.onRemove(b[c])}}}d.callParent(arguments)},isEqual:function(b,a){var c=Ext.Object.toQueryString;return c(b)===c(a)},getErrors:function(){var a=[];if(!this.allowBlank&&Ext.isEmpty(this.getChecked())){a.push(this.blankText)}return a},getBoxes:function(a){return this.query("[isCheckbox]"+(a||""))},eachBox:function(b,a){Ext.Array.forEach(this.getBoxes(),b,a||this)},getChecked:function(){return this.getBoxes("[checked]")},isDirty:function(){var c=this.getBoxes(),a,d=c.length;for(a=0;a<d;a++){if(c[a].isDirty()){return true}}},setReadOnly:function(e){var c=this.getBoxes(),a,d=c.length;for(a=0;a<d;a++){c[a].setReadOnly(e)}this.readOnly=e},reset:function(){var c=this,b=c.hasActiveError(),a=c.preventMark;c.preventMark=true;c.batchChanges(function(){var e=c.getBoxes(),d,g=e.length;for(d=0;d<g;d++){e[d].reset()}});c.preventMark=a;c.unsetActiveError();if(b){c.updateLayout()}},resetOriginalValue:function(){var d=this,c=d.getBoxes(),a,e=c.length;for(a=0;a<e;a++){c[a].resetOriginalValue()}d.originalValue=d.getValue();d.checkDirty()},setValue:function(h){var g=this,d=g.getBoxes(),a,j=d.length,e,c,i;g.batchChanges(function(){for(a=0;a<j;a++){e=d[a];c=e.getName();i=false;if(h&&h.hasOwnProperty(c)){if(Ext.isArray(h[c])){i=Ext.Array.contains(h[c],e.inputValue)}else{i=h[c]}}e.setValue(i)}});return g},getValue:function(){var d={},g=this.getBoxes(),c,j=g.length,h,e,a,i;for(c=0;c<j;c++){h=g[c];e=h.getName();a=h.inputValue;if(h.getValue()){if(d.hasOwnProperty(e)){i=d[e];if(!Ext.isArray(i)){i=d[e]=[i]}i.push(a)}else{d[e]=a}}}return d},getSubmitData:function(){return null},getModelData:function(){return null},validate:function(){var a=this,d,c,b;if(a.disabled){c=true}else{d=a.getErrors();c=Ext.isEmpty(d);b=a.wasValid;if(c){a.unsetActiveError()}else{a.setActiveError(d)}}if(c!==b){a.wasValid=c;a.fireEvent("validitychange",a,c);a.updateLayout()}return c}},function(){this.borrow(Ext.form.field.Base,["markInvalid","clearInvalid"])});Ext.define("Ext.form.CheckboxManager",{extend:Ext.util.MixedCollection,singleton:true,getByName:function(a,b){return this.filterBy(function(c){return c.name==a&&c.getFormId()==b})}});Ext.define("Ext.form.FieldSet",{extend:Ext.container.Container,mixins:{fieldAncestor:Ext.form.FieldAncestor},alias:"widget.fieldset",collapsed:false,toggleOnTitleClick:true,baseCls:Ext.baseCSSPrefix+"fieldset",layout:"anchor",border:1,componentLayout:"fieldset",autoEl:"fieldset",childEls:["body"],renderTpl:["{%this.renderLegend(out,values);%}",'<div id="{id}-body" class="{baseCls}-body {bodyTargetCls}"<tpl if="bodyStyle"> style="{bodyStyle}"</tpl>>',"{%this.renderContainer(out,values);%}","</div>"],stateEvents:["collapse","expand"],maskOnDisable:false,beforeDestroy:function(){var b=this,a=b.legend;if(a){delete a.ownerCt;a.destroy();b.legend=null}b.callParent()},initComponent:function(){var b=this,a=b.baseCls;b.callParent();b.layout.managePadding=b.layout.manageOverflow=false;b.addEvents("beforeexpand","beforecollapse","expand","collapse");if(b.collapsed){b.addCls(a+"-collapsed");b.collapse()}if(b.title||b.checkboxToggle||b.collapsible){b.addTitleClasses();b.legend=Ext.widget(b.createLegendCt())}},initPadding:function(g){var d=this,c=Ext.Element,a=d.getProtoBody(),e=d.padding,b;if(e!==undefined){if(Ext.isIEQuirks||Ext.isIE8m){e=c.parseBox(e);b=c.parseBox(0);b.top=e.top;e.top=0;a.setStyle("padding",c.unitizeBox(b))}g.setStyle("padding",c.unitizeBox(e))}},getProtoBody:function(){var b=this,a=b.protoBody;if(!a){b.protoBody=a=new Ext.util.ProtoElement({styleProp:"bodyStyle",styleIsText:true})}return a},initRenderData:function(){var a=this,b=a.callParent();b.bodyTargetCls=a.bodyTargetCls;a.protoBody.writeTo(b);delete a.protoBody;return b},getState:function(){var a=this.callParent();a=this.addPropertyToState(a,"collapsed");return a},afterCollapse:Ext.emptyFn,afterExpand:Ext.emptyFn,collapsedHorizontal:function(){return true},collapsedVertical:function(){return true},createLegendCt:function(){var c=this,a=[],b={xtype:"container",baseCls:c.baseCls+"-header",id:c.id+"-legend",autoEl:"legend",items:a,ownerCt:c,shrinkWrap:true,ownerLayout:c.componentLayout};if(c.checkboxToggle){a.push(c.createCheckboxCmp())}else{if(c.collapsible){a.push(c.createToggleCmp())}}a.push(c.createTitleCmp());return b},createTitleCmp:function(){var b=this,a={xtype:"component",html:b.title,cls:b.baseCls+"-header-text",id:b.id+"-legendTitle"};if(b.collapsible&&b.toggleOnTitleClick){a.listeners={click:{element:"el",scope:b,fn:b.toggle}};a.cls+=" "+b.baseCls+"-header-text-collapsible"}return(b.titleCmp=Ext.widget(a))},createCheckboxCmp:function(){var a=this,b="-checkbox";a.checkboxCmp=Ext.widget({xtype:"checkbox",hideEmptyLabel:true,name:a.checkboxName||a.id+b,cls:a.baseCls+"-header"+b,id:a.id+"-legendChk",checked:!a.collapsed,listeners:{change:a.onCheckChange,scope:a}});return a.checkboxCmp},createToggleCmp:function(){var a=this;a.toggleCmp=Ext.widget({xtype:"tool",height:15,width:15,type:"toggle",handler:a.toggle,id:a.id+"-legendToggle",scope:a});return a.toggleCmp},doRenderLegend:function(b,e){var d=e.$comp,c=d.legend,a;if(c){c.ownerLayout.configureItem(c);a=c.getRenderTree();Ext.DomHelper.generateMarkup(a,b)}},finishRender:function(){var a=this.legend;this.callParent();if(a){a.finishRender()}},getCollapsed:function(){return this.collapsed?"top":false},getCollapsedDockedItems:function(){var a=this.legend;return a?[a]:[]},setTitle:function(d){var c=this,b=c.legend,a=c.baseCls;c.title=d;if(c.rendered){if(!b){c.legend=b=Ext.widget(c.createLegendCt());c.addTitleClasses();b.ownerLayout.configureItem(b);b.render(c.el,0)}c.titleCmp.update(d)}else{if(b){c.titleCmp.update(d)}else{c.addTitleClasses();c.legend=Ext.widget(c.createLegendCt())}}return c},addTitleClasses:function(){var b=this,c=b.title,a=b.baseCls;if(c){b.addCls(a+"-with-title")}if(c||b.checkboxToggle||b.collapsible){b.addCls(a+"-with-header")}},applyTargetCls:function(a){this.bodyTargetCls=a},getTargetEl:function(){return this.body||this.frameBody||this.el},getDefaultContentTarget:function(){return this.body},expand:function(){return this.setExpanded(true)},collapse:function(){return this.setExpanded(false)},setExpanded:function(b){var c=this,d=c.checkboxCmp,a=b?"expand":"collapse";if(!c.rendered||c.fireEvent("before"+a,c)!==false){b=!!b;if(d){d.setValue(b)}if(b){c.removeCls(c.baseCls+"-collapsed")}else{c.addCls(c.baseCls+"-collapsed")}c.collapsed=!b;if(c.rendered){c.updateLayout({isRoot:false});c.fireEvent(a,c)}}return c},getRefItems:function(a){var c=this.callParent(arguments),b=this.legend;if(b){c.unshift(b);if(a){c.unshift.apply(c,b.getRefItems(true))}}return c},toggle:function(){this.setExpanded(!!this.collapsed)},onCheckChange:function(b,a){this.setExpanded(a)},setupRenderTpl:function(a){this.callParent(arguments);a.renderLegend=this.doRenderLegend}});Ext.define("Ext.form.Label",{extend:Ext.Component,alias:"widget.label",autoEl:"label",maskOnDisable:false,getElConfig:function(){var a=this;a.html=a.text?Ext.util.Format.htmlEncode(a.text):(a.html||"");return Ext.apply(a.callParent(),{htmlFor:a.forId||""})},setText:function(c,b){var a=this;b=b!==false;if(b){a.text=c;delete a.html}else{a.html=c;delete a.text}if(a.rendered){a.el.dom.innerHTML=b!==false?Ext.util.Format.htmlEncode(c):c;a.updateLayout()}return a}});Ext.define("Ext.form.Panel",{extend:Ext.panel.Panel,mixins:{fieldAncestor:Ext.form.FieldAncestor},alias:"widget.form",alternateClassName:["Ext.FormPanel","Ext.form.FormPanel"],layout:"anchor",ariaRole:"form",basicFormConfigs:["api","baseParams","errorReader","jsonSubmit","method","paramOrder","paramsAsHash","reader","standardSubmit","timeout","trackResetOnLoad","url","waitMsgTarget","waitTitle"],initComponent:function(){var a=this;if(a.frame){a.border=false}a.initFieldAncestor();a.callParent();a.relayEvents(a.form,["beforeaction","actionfailed","actioncomplete","validitychange","dirtychange"]);if(a.pollForChanges){a.startPolling(a.pollInterval||500)}},initItems:function(){this.callParent();this.initMonitor();this.form=this.createForm()},afterFirstLayout:function(){this.callParent(arguments);this.form.initialize()},createForm:function(){var b={},d=this.basicFormConfigs,a=d.length,c=0,e;for(;c<a;++c){e=d[c];b[e]=this[e]}return new Ext.form.Basic(this,b)},getForm:function(){return this.form},loadRecord:function(a){return this.getForm().loadRecord(a)},getRecord:function(){return this.getForm().getRecord()},getValues:function(d,b,c,a){return this.getForm().getValues(d,b,c,a)},isDirty:function(){return this.form.isDirty()},isValid:function(){return this.form.isValid()},hasInvalidField:function(){return this.form.hasInvalidField()},beforeDestroy:function(){this.stopPolling();this.form.destroy();this.callParent()},load:function(a){this.form.load(a)},submit:function(a){this.form.submit(a)},startPolling:function(b){this.stopPolling();var a=new Ext.util.TaskRunner(b);a.start({interval:0,run:this.checkChange,scope:this});this.pollTask=a},stopPolling:function(){var a=this.pollTask;if(a){a.stopAll();delete this.pollTask}},checkChange:function(){var a=this.form.getFields().items,b,c=a.length;for(b=0;b<c;b++){a[b].checkChange()}}});Ext.define("Ext.form.RadioGroup",{extend:Ext.form.CheckboxGroup,alias:"widget.radiogroup",allowBlank:true,blankText:"You must select one item in this group",defaultType:"radiofield",groupCls:Ext.baseCSSPrefix+"form-radio-group",getBoxes:function(a){return this.query("[isRadio]"+(a||""))},checkChange:function(){var b=this.getValue(),a=Ext.Object.getKeys(b)[0];if(Ext.isArray(b[a])){return}this.callParent(arguments)},setValue:function(d){var j,g,e,h,c,a,b;if(Ext.isObject(d)){for(b in d){if(d.hasOwnProperty(b)){j=d[b];g=this.items.first();e=g?g.getFormId():null;h=Ext.form.RadioManager.getWithValue(b,j,e).items;a=h.length;for(c=0;c<a;++c){h[c].setValue(true)}}}}return this}});Ext.define("Ext.form.RadioManager",{extend:Ext.util.MixedCollection,singleton:true,getByName:function(a,b){return this.filterBy(function(c){return c.name==a&&c.getFormId()==b})},getWithValue:function(a,b,c){return this.filterBy(function(d){return d.name==a&&d.inputValue==b&&d.getFormId()==c})},getChecked:function(a,b){return this.findBy(function(c){return c.name==a&&c.checked&&c.getFormId()==b})}});Ext.define("Ext.form.action.DirectLoad",{extend:Ext.form.action.Load,alternateClassName:"Ext.form.Action.DirectLoad",alias:"formaction.directload",type:"directload",run:function(){var d=this,c=d.form,b=c.api.load,e=b.directCfg.method,a=e.getArgs(d.getParams(),c.paramOrder,c.paramsAsHash);a.push(d.onComplete,d);b.apply(window,a)},processResponse:function(a){return(this.result=a)},onComplete:function(b,a){if(b){this.onSuccess(b)}else{this.onFailure(null)}}});Ext.define("Ext.form.action.DirectSubmit",{extend:Ext.form.action.Submit,alternateClassName:"Ext.form.Action.DirectSubmit",alias:"formaction.directsubmit",type:"directsubmit",doSubmit:function(){var a=this,c=Ext.Function.bind(a.onComplete,a),b=a.buildForm();a.form.api.submit(b.formEl,c,a);a.cleanup(b)},processResponse:function(a){return(this.result=a)},onComplete:function(b,a){if(b){this.onSuccess(b)}else{this.onFailure(null)}}});Ext.define("Ext.form.action.StandardSubmit",{extend:Ext.form.action.Submit,alias:"formaction.standardsubmit",doSubmit:function(){var a=this.buildForm();a.formEl.submit();this.cleanup(a)}});Ext.define("Ext.form.field.Checkbox",{extend:Ext.form.field.Base,alias:["widget.checkboxfield","widget.checkbox"],alternateClassName:"Ext.form.Checkbox",componentLayout:"field",stretchInputElFixed:false,childEls:["boxLabelEl"],fieldSubTpl:["<tpl if=\"boxLabel && boxLabelAlign == 'before'\">","{beforeBoxLabelTpl}",'<label id="{cmpId}-boxLabelEl" {boxLabelAttrTpl} class="{boxLabelCls} {boxLabelCls}-{boxLabelAlign}" for="{id}">',"{beforeBoxLabelTextTpl}","{boxLabel}","{afterBoxLabelTextTpl}","</label>","{afterBoxLabelTpl}","</tpl>",'<input type="button" id="{id}" {inputAttrTpl}','<tpl if="tabIdx"> tabIndex="{tabIdx}"</tpl>','<tpl if="disabled"> disabled="disabled"</tpl>','<tpl if="fieldStyle"> style="{fieldStyle}"</tpl>',' class="{fieldCls} {typeCls} {inputCls}" autocomplete="off" hidefocus="true" />',"<tpl if=\"boxLabel && boxLabelAlign == 'after'\">","{beforeBoxLabelTpl}",'<label id="{cmpId}-boxLabelEl" {boxLabelAttrTpl} class="{boxLabelCls} {boxLabelCls}-{boxLabelAlign}" for="{id}">',"{beforeBoxLabelTextTpl}","{boxLabel}","{afterBoxLabelTextTpl}","</label>","{afterBoxLabelTpl}","</tpl>",{disableFormats:true,compiled:true}],subTplInsertions:["beforeBoxLabelTpl","afterBoxLabelTpl","beforeBoxLabelTextTpl","afterBoxLabelTextTpl","boxLabelAttrTpl","inputAttrTpl"],isCheckbox:true,focusCls:"form-checkbox-focus",fieldBodyCls:Ext.baseCSSPrefix+"form-cb-wrap",checked:false,checkedCls:Ext.baseCSSPrefix+"form-cb-checked",boxLabelCls:Ext.baseCSSPrefix+"form-cb-label",boxLabelAlign:"after",inputValue:"on",checkChangeEvents:[],inputType:"checkbox",onRe:/^on$/i,inputCls:Ext.baseCSSPrefix+"form-cb",initComponent:function(){this.callParent(arguments);this.getManager().add(this)},initValue:function(){var b=this,a=!!b.checked;b.originalValue=b.lastValue=a;b.setValue(a)},getElConfig:function(){var a=this;if(a.isChecked(a.rawValue,a.inputValue)){a.addCls(a.checkedCls)}return a.callParent()},getFieldStyle:function(){return Ext.isObject(this.fieldStyle)?Ext.DomHelper.generateStyles(this.fieldStyle):this.fieldStyle||""},getSubTplData:function(){var a=this;return Ext.apply(a.callParent(),{disabled:a.readOnly||a.disabled,boxLabel:a.boxLabel,boxLabelCls:a.boxLabelCls,boxLabelAlign:a.boxLabelAlign})},initEvents:function(){var a=this;a.callParent();a.mon(a.inputEl,"click",a.onBoxClick,a)},setBoxLabel:function(a){var b=this;b.boxLabel=a;if(b.rendered){b.boxLabelEl.update(a)}},onBoxClick:function(b){var a=this;if(!a.disabled&&!a.readOnly){this.setValue(!this.checked)}},getRawValue:function(){return this.checked},getValue:function(){return this.checked},getSubmitValue:function(){var a=this.uncheckedValue,b=Ext.isDefined(a)?a:null;return this.checked?this.inputValue:b},isChecked:function(b,a){return(b===true||b==="true"||b==="1"||b===1||(((Ext.isString(b)||Ext.isNumber(b))&&a)?b==a:this.onRe.test(b)))},setRawValue:function(c){var b=this,d=b.inputEl,a=b.isChecked(c,b.inputValue);if(d){b[a?"addCls":"removeCls"](b.checkedCls)}b.checked=b.rawValue=a;return a},setValue:function(g){var e=this,c,b,a,d;if(Ext.isArray(g)){c=e.getManager().getByName(e.name,e.getFormId()).items;a=c.length;for(b=0;b<a;++b){d=c[b];d.setValue(Ext.Array.contains(g,d.inputValue))}}else{e.callParent(arguments)}return e},valueToRaw:function(a){return a},onChange:function(b,a){var d=this,c=d.handler;if(c){c.call(d.scope||d,d,b)}d.callParent(arguments)},resetOriginalValue:function(b){var g=this,d,e,a,c;if(!b){d=g.getManager().getByName(g.name,g.getFormId()).items;a=d.length;for(c=0;c<a;++c){e=d[c];if(e!==g){d[c].resetOriginalValue(true)}}}g.callParent()},beforeDestroy:function(){this.callParent();this.getManager().removeAtKey(this.id)},getManager:function(){return Ext.form.CheckboxManager},onEnable:function(){var a=this,b=a.inputEl;a.callParent();if(b){b.dom.disabled=a.readOnly}},setReadOnly:function(c){var a=this,b=a.inputEl;if(b){b.dom.disabled=!!c||a.disabled}a.callParent(arguments)},getFormId:function(){var b=this,a;if(!b.formId){a=b.up("form");if(a){b.formId=a.id}}return b.formId}});Ext.define("Ext.layout.component.field.Trigger",{alias:"layout.triggerfield",extend:Ext.layout.component.field.Field,type:"triggerfield",borderWidths:{},beginLayout:function(d){var c=this,a=c.owner,b;d.triggerWrap=d.getEl("triggerWrap");c.callParent(arguments);b=a.getTriggerStateFlags();if(b!=a.lastTriggerStateFlags){a.lastTriggerStateFlags=b;c.updateEditState()}},beginLayoutCycle:function(a){this.callParent(arguments);if(a.widthModel.shrinkWrap&&!this.owner.inputWidth){a.inputContext.el.setStyle("width","")}},beginLayoutFixed:function(g,c,h){var d=this,a=g.target,e=d.ieInputWidthAdjustment||0,i="100%",b=a.triggerWrap;d.callParent(arguments);a.inputCell.setStyle("width","100%");if(e){d.adjustIEInputPadding(g);if(h==="px"){if(a.inputWidth){i=a.inputWidth-d.getExtraWidth(g)}else{i=c-e-d.getExtraWidth(g)}i+="px"}}a.inputEl.setStyle("width",i);i=a.inputWidth;if(i){b.setStyle("width",i+(e)+"px")}else{b.setStyle("width",c+h)}b.setStyle("table-layout","fixed")},adjustIEInputPadding:function(a){this.owner.inputCell.setStyle("padding-right",this.ieInputWidthAdjustment+"px")},getExtraWidth:function(d){var b=this,a=b.owner,e=b.borderWidths,c=a.ui+a.triggerEl.getCount();if(!(c in e)){e[c]=d.triggerWrap.getBorderInfo().width}return e[c]+a.getTriggerWidth()},beginLayoutShrinkWrap:function(c){var a=c.target,e="",d=a.inputWidth,b=a.triggerWrap;this.callParent(arguments);if(d){b.setStyle("width",d+"px");d=(d-this.getExtraWidth(c))+"px";a.inputEl.setStyle("width",d);a.inputCell.setStyle("width",d)}else{a.inputCell.setStyle("width",e);a.inputEl.setStyle("width",e);b.setStyle("width",e);b.setStyle("table-layout","auto")}},getTextWidth:function(){var b=this,a=b.owner,d=a.inputEl,c;c=(d.dom.value||(a.hasFocus?"":a.emptyText)||"")+a.growAppend;return d.getTextWidth(c)},publishOwnerWidth:function(c,b){var a=this.owner;this.callParent(arguments);if(!a.grow&&!a.inputWidth){b-=this.getExtraWidth(c);if(a.labelAlign!="top"){b-=a.getLabelWidth()}c.inputContext.setWidth(b)}},measureContentWidth:function(h){var g=this,b=g.owner,e=g.callParent(arguments),i=h.inputContext,d,a,c;if(b.grow&&!h.state.growHandled){d=g.getTextWidth()+h.inputContext.getFrameInfo().width;a=b.growMax;c=Math.min(a,e);a=Math.max(b.growMin,a,c);d=Ext.Number.constrain(d,b.growMin,a);i.setWidth(d);h.state.growHandled=true;i.domBlock(g,"width");e=NaN}else{if(!b.inputWidth){e-=g.getExtraWidth(h)}}return e},updateEditState:function(){var c=this,a=c.owner,e=a.inputEl,d=Ext.baseCSSPrefix+"trigger-noedit",b,g;if(c.owner.readOnly){e.addCls(d);g=true;b=false}else{if(c.owner.editable){e.removeCls(d);g=false}else{e.addCls(d);g=true}b=!c.owner.hideTrigger}a.triggerCell.setDisplayed(b);e.dom.readOnly=g}});Ext.define("Ext.form.field.Trigger",{extend:Ext.form.field.Text,alias:["widget.triggerfield","widget.trigger"],alternateClassName:["Ext.form.TriggerField","Ext.form.TwinTriggerField","Ext.form.Trigger"],childEls:[{name:"triggerCell",select:"."+Ext.baseCSSPrefix+"trigger-cell"},{name:"triggerEl",select:"."+Ext.baseCSSPrefix+"form-trigger"},"triggerWrap","inputCell"],triggerBaseCls:Ext.baseCSSPrefix+"form-trigger",triggerWrapCls:Ext.baseCSSPrefix+"form-trigger-wrap",triggerNoEditCls:Ext.baseCSSPrefix+"trigger-noedit",hideTrigger:false,editable:true,readOnly:false,repeatTriggerClick:false,autoSize:Ext.emptyFn,monitorTab:true,mimicing:false,triggerIndexRe:/trigger-index-(\d+)/,extraTriggerCls:"",componentLayout:"triggerfield",initComponent:function(){this.wrapFocusCls=this.triggerWrapCls+"-focus";this.callParent(arguments)},getSubTplMarkup:function(b){var c=this,a=b.childElCls,d=c.callParent(arguments);return'<table id="'+c.id+'-triggerWrap" class="'+Ext.baseCSSPrefix+"form-trigger-wrap"+a+'" cellpadding="0" cellspacing="0"><tbody><tr><td id="'+c.id+'-inputCell" class="'+Ext.baseCSSPrefix+"form-trigger-input-cell"+a+'">'+d+"</td>"+c.getTriggerMarkup()+"</tr></tbody></table>"},getSubTplData:function(){var b=this,c=b.callParent(),d=b.readOnly===true,a=b.editable!==false;return Ext.apply(c,{editableCls:(d||!a)?" "+b.triggerNoEditCls:"",readOnly:!a||d})},getLabelableRenderData:function(){var b=this,c=b.triggerWrapCls,a=b.callParent(arguments);return Ext.applyIf(a,{triggerWrapCls:c,triggerMarkup:b.getTriggerMarkup()})},getTriggerMarkup:function(){var e=this,c=0,j=(e.readOnly||e.hideTrigger),a,g=e.triggerBaseCls,h=[],d=Ext.dom.Element.unselectableCls,b="width:"+e.triggerWidth+"px;"+(j?"display:none;":""),k=e.extraTriggerCls+" "+Ext.baseCSSPrefix+"trigger-cell "+d;if(!e.trigger1Cls){e.trigger1Cls=e.triggerCls}for(c=0;(a=e["trigger"+(c+1)+"Cls"])||c<1;c++){h.push({tag:"td",valign:"top",cls:k,style:b,cn:{cls:[Ext.baseCSSPrefix+"trigger-index-"+c,g,a].join(" "),role:"button"}})}h[0].cn.cls+=" "+g+"-first";return Ext.DomHelper.markup(h)},disableCheck:function(){return !this.disabled},beforeRender:function(){var a=this,b=a.triggerBaseCls,c;if(!a.triggerWidth){c=Ext.getBody().createChild({style:"position: absolute;",cls:Ext.baseCSSPrefix+"form-trigger"});Ext.form.field.Trigger.prototype.triggerWidth=c.getWidth();c.remove()}a.callParent();if(b!=Ext.baseCSSPrefix+"form-trigger"){a.addChildEls({name:"triggerEl",select:"."+b})}a.lastTriggerStateFlags=a.getTriggerStateFlags()},onRender:function(){var a=this;a.callParent(arguments);a.doc=Ext.getDoc();a.initTrigger()},getTriggerWidth:function(){var b=this,a=0;if(b.triggerWrap&&!b.hideTrigger&&!b.readOnly){a=b.triggerEl.getCount()*b.triggerWidth}return a},setHideTrigger:function(a){if(a!=this.hideTrigger){this.hideTrigger=a;this.updateLayout()}},setEditable:function(a){if(a!=this.editable){this.editable=a;this.updateLayout()}},setReadOnly:function(c){var b=this,a=b.readOnly;b.callParent(arguments);if(c!=a){b.updateLayout()}},initTrigger:function(){var h=this,i=h.triggerWrap,k=h.triggerEl,a=h.disableCheck,d,c,b,g,j;if(h.repeatTriggerClick){h.triggerRepeater=new Ext.util.ClickRepeater(i,{preventDefault:true,handler:h.onTriggerWrapClick,listeners:{mouseup:h.onTriggerWrapMouseup,scope:h},scope:h})}else{h.mon(i,{click:h.onTriggerWrapClick,mouseup:h.onTriggerWrapMouseup,scope:h})}k.setVisibilityMode(Ext.Element.DISPLAY);k.addClsOnOver(h.triggerBaseCls+"-over",a,h);d=k.elements;c=d.length;for(g=0;g<c;g++){b=d[g];j=g+1;b.addClsOnOver(h["trigger"+(j)+"Cls"]+"-over",a,h);b.addClsOnClick(h["trigger"+(j)+"Cls"]+"-click",a,h)}k.addClsOnClick(h.triggerBaseCls+"-click",a,h)},onDestroy:function(){var a=this;Ext.destroyMembers(a,"triggerRepeater","triggerWrap","triggerEl");delete a.doc;a.callParent()},onFocus:function(){var a=this;a.callParent(arguments);if(!a.mimicing){a.bodyEl.addCls(a.wrapFocusCls);a.mimicing=true;a.mon(a.doc,"mousedown",a.mimicBlur,a,{delay:10});if(a.monitorTab){a.on("specialkey",a.checkTab,a)}}},checkTab:function(a,b){if(!this.ignoreMonitorTab&&b.getKey()==b.TAB){this.triggerBlur()}},getTriggerStateFlags:function(){var a=this,b=0;if(a.readOnly){b+=1}if(a.editable){b+=2}if(a.hideTrigger){b+=4}return b},onBlur:Ext.emptyFn,mimicBlur:function(a){if(!this.isDestroyed&&!this.bodyEl.contains(a.target)&&this.validateBlur(a)){this.triggerBlur(a)}},triggerBlur:function(b){var a=this;a.mimicing=false;a.mun(a.doc,"mousedown",a.mimicBlur,a);if(a.monitorTab&&a.inputEl){a.un("specialkey",a.checkTab,a)}Ext.form.field.Trigger.superclass.onBlur.call(a,b);if(a.bodyEl){a.bodyEl.removeCls(a.wrapFocusCls)}},validateBlur:function(a){return true},onTriggerWrapClick:function(){var d=this,e,b,a,c;c=arguments[d.triggerRepeater?1:0];if(c&&!d.readOnly&&!d.disabled){e=c.getTarget("."+d.triggerBaseCls,null);b=e&&e.className.match(d.triggerIndexRe);if(b){a=d["onTrigger"+(parseInt(b[1],10)+1)+"Click"]||d.onTriggerClick;if(a){a.call(d,c)}}}},onTriggerWrapMouseup:Ext.emptyFn,onTriggerClick:Ext.emptyFn});Ext.define("Ext.form.field.Picker",{extend:Ext.form.field.Trigger,alias:"widget.pickerfield",alternateClassName:"Ext.form.Picker",matchFieldWidth:true,pickerAlign:"tl-bl?",openCls:Ext.baseCSSPrefix+"pickerfield-open",editable:true,initComponent:function(){this.callParent();this.addEvents("expand","collapse","select")},initEvents:function(){var a=this;a.callParent();a.keyNav=new Ext.util.KeyNav(a.inputEl,{down:a.onDownArrow,esc:{handler:a.onEsc,scope:a,defaultEventAction:false},scope:a,forceKeyDown:true});if(!a.editable){a.mon(a.inputEl,"click",a.onTriggerClick,a)}if(Ext.isGecko){a.inputEl.dom.setAttribute("autocomplete","off")}},onEsc:function(a){if(Ext.isIE){a.preventDefault()}if(this.isExpanded){this.collapse();a.stopEvent()}},onDownArrow:function(a){if(!this.isExpanded){this.onTriggerClick()}},expand:function(){var c=this,a,b,d;if(c.rendered&&!c.isExpanded&&!c.isDestroyed){a=c.bodyEl;b=c.getPicker();d=c.collapseIf;b.show();c.isExpanded=true;c.alignPicker();a.addCls(c.openCls);c.mon(Ext.getDoc(),{mousewheel:d,mousedown:d,scope:c});Ext.EventManager.onWindowResize(c.alignPicker,c);c.fireEvent("expand",c);c.onExpand()}},onExpand:Ext.emptyFn,alignPicker:function(){var b=this,a=b.getPicker();if(b.isExpanded){if(b.matchFieldWidth){a.setWidth(b.bodyEl.getWidth())}if(a.isFloating()){b.doAlign()}}},doAlign:function(){var d=this,c=d.picker,a="-above",b;d.picker.alignTo(d.bodyEl,d.pickerAlign,d.pickerOffset);b=c.el.getY()<d.inputEl.getY();d.bodyEl[b?"addCls":"removeCls"](d.openCls+a);c[b?"addCls":"removeCls"](c.baseCls+a)},collapse:function(){if(this.isExpanded&&!this.isDestroyed){var d=this,c=d.openCls,b=d.picker,e=Ext.getDoc(),g=d.collapseIf,a="-above";b.hide();d.isExpanded=false;d.bodyEl.removeCls([c,c+a]);b.el.removeCls(b.baseCls+a);e.un("mousewheel",g,d);e.un("mousedown",g,d);Ext.EventManager.removeResizeListener(d.alignPicker,d);d.fireEvent("collapse",d);d.onCollapse()}},onCollapse:Ext.emptyFn,collapseIf:function(b){var a=this;if(!a.isDestroyed&&!b.within(a.bodyEl,false,true)&&!b.within(a.picker.el,false,true)&&!a.isEventWithinPickerLoadMask(b)){a.collapse()}},getPicker:function(){var a=this;return a.picker||(a.picker=a.createPicker())},createPicker:Ext.emptyFn,onTriggerClick:function(){var a=this;if(!a.readOnly&&!a.disabled){if(a.isExpanded){a.collapse()}else{a.expand()}a.inputEl.focus()}},triggerBlur:function(){var a=this.picker;this.callParent(arguments);if(a&&a.isVisible()){a.hide()}},mimicBlur:function(c){var b=this,a=b.picker;if(!a||!c.within(a.el,false,true)&&!b.isEventWithinPickerLoadMask(c)){b.callParent(arguments)}},onDestroy:function(){var b=this,a=b.picker;Ext.EventManager.removeResizeListener(b.alignPicker,b);Ext.destroy(b.keyNav);if(a){delete a.pickerField;a.destroy()}b.callParent()},isEventWithinPickerLoadMask:function(b){var a=this.picker.loadMask;return a?b.within(a.maskEl,false,true)||b.within(a.el,false,true):false}});Ext.define("Ext.selection.Model",{extend:Ext.util.Observable,alternateClassName:"Ext.AbstractSelectionModel",mixins:{bindable:Ext.util.Bindable},allowDeselect:false,selected:null,pruneRemoved:true,constructor:function(a){var b=this;a=a||{};Ext.apply(b,a);b.addEvents("selectionchange","focuschange");b.modes={SINGLE:true,SIMPLE:true,MULTI:true};b.setSelectionMode(a.mode||b.mode);b.selected=new Ext.util.MixedCollection(null,b.getSelectionId);b.callParent(arguments)},bindStore:function(a,b){var c=this;c.mixins.bindable.bindStore.apply(c,arguments);if(c.store&&!b){c.refresh()}},getStoreListeners:function(){var a=this;return{add:a.onStoreAdd,clear:a.onStoreClear,bulkremove:a.onStoreRemove,update:a.onStoreUpdate,load:a.onStoreLoad,idchanged:a.onModelIdChanged,refresh:a.onStoreRefresh}},selectAll:function(b){var e=this,d=e.store.getRange(),c=0,a=d.length,g=e.getSelection().length;e.bulkChange=true;for(;c<a;c++){e.doSelect(d[c],true,b)}delete e.bulkChange;e.maybeFireSelectionChange(e.getSelection().length!==g)},deselectAll:function(b){var e=this,d=e.getSelection(),c=0,a=d.length,g=e.getSelection().length;e.bulkChange=true;for(;c<a;c++){e.doDeselect(d[c],b)}delete e.bulkChange;e.maybeFireSelectionChange(e.getSelection().length!==g)},selectWithEvent:function(a,g,d){var c=this,b=c.isSelected(a);switch(c.selectionMode){case"MULTI":if(g.shiftKey&&c.selectionStart){c.selectRange(c.selectionStart,a,g.ctrlKey)}else{if(g.ctrlKey&&b){c.doDeselect(a,false)}else{if(g.ctrlKey){c.doSelect(a,true,false)}else{if(b&&!g.shiftKey&&!g.ctrlKey&&c.selected.getCount()>1){c.doSelect(a,d,false)}else{if(!b){c.doSelect(a,false)}}}}}break;case"SIMPLE":if(b){c.doDeselect(a)}else{c.doSelect(a,true)}break;case"SINGLE":if(c.allowDeselect&&b){c.doDeselect(a)}else{c.doSelect(a,false)}break}if(!g.shiftKey){if(c.isSelected(a)){c.selectionStart=a}else{c.selectionStart=null}}},afterKeyNavigate:function(g,d){var h=this,c,a,b=h.isSelected(d),j=(h.selectionStart&&h.isSelected(h.lastFocused))?h.selectionStart:(h.selectionStart=h.lastFocused),k=g.getCharCode(),l=k===g.SPACE,i=k===g.UP||k===g.PAGE_UP?"up":(k===g.DOWN||k===g.DOWN?"down":null);switch(h.selectionMode){case"MULTI":if(l){if(g.shiftKey){h.selectRange(j,d,g.ctrlKey)}else{if(b){h.doDeselect(d,g.ctrlKey);h.setLastFocused(null);h.setLastFocused(d)}else{h.doSelect(d,g.ctrlKey)}}}else{if(g.shiftKey&&j){a=h.store.indexOf(j);c=h.store.indexOf(d);if(i==="up"&&a<=c){h.deselectRange(h.lastFocused,c+1)}else{if(i==="down"&&a>=c){h.deselectRange(h.lastFocused,c-1)}else{if(j!==d){h.selectRange(j,d,g.ctrlKey)}}}h.lastSelected=d;h.setLastFocused(d)}else{if(g.ctrlKey&&b){h.setLastFocused(d)}else{if(g.ctrlKey){h.setLastFocused(d)}else{h.doSelect(d,false)}}}}break;case"SIMPLE":if(b){h.doDeselect(d)}else{h.doSelect(d,true)}break;case"SINGLE":if(l){if(b){h.doDeselect(d);h.setLastFocused(d)}else{h.doSelect(d)}}else{if(g.ctrlKey){h.setLastFocused(d)}else{if(h.allowDeselect&&b){h.doDeselect(d)}else{h.doSelect(d,false)}}}break}if(!g.shiftKey){if(h.isSelected(d)){h.selectionStart=d}}},selectRange:function(c,b,h){var g=this,a=g.store,d,e=[];if(g.isLocked()){return}if(!h){g.deselectAll(true)}if(!Ext.isNumber(c)){c=a.indexOf(c)}if(!Ext.isNumber(b)){b=a.indexOf(b)}if(c>b){d=b;b=c;c=d}for(d=c;d<=b;d++){if(!g.isSelected(a.getAt(d))){e.push(a.getAt(d))}}g.doMultiSelect(e,true)},deselectRange:function(d,c){var h=this,b=h.store,g,e,a;if(h.isLocked()){return}if(!Ext.isNumber(d)){d=b.indexOf(d)}if(!Ext.isNumber(c)){c=b.indexOf(c)}if(d>c){e=c;c=d;d=e}for(g=d;g<=c;g++){a=b.getAt(g);if(h.isSelected(a)){h.deselect(a)}}},onModelIdChanged:function(a,d,e,c,b){this.selected.updateKey(b,c)},select:function(b,c,a){if(Ext.isDefined(b)){this.doSelect(b,c,a)}},deselect:function(b,a){this.doDeselect(b,a)},doSelect:function(c,e,b){var d=this,a;if(d.locked||!d.store){return}if(typeof c==="number"){a=d.store.getAt(c);if(!a){return}c=[a]}if(d.selectionMode=="SINGLE"&&c){a=c.length?c[0]:c;d.doSingleSelect(a,b)}else{d.doMultiSelect(c,e,b)}},doMultiSelect:function(a,l,k){var h=this,b=h.selected,j=false,d=0,g,e;if(h.locked){return}a=!Ext.isArray(a)?[a]:a;g=a.length;if(!l&&b.getCount()>0){if(h.doDeselect(h.getSelection(),k)===false){return}}function c(){b.add(e);j=true}for(;d<g;d++){e=a[d];if(l&&h.isSelected(e)){continue}h.lastSelected=e;h.onSelectChange(e,true,k,c)}if(!h.preventFocus){h.setLastFocused(e,k)}h.maybeFireSelectionChange(j&&!k)},doDeselect:function(a,k){var j=this,b=j.selected,d=0,h,e,l=0,g=0;if(j.locked||!j.store){return false}if(typeof a==="number"){e=j.store.getAt(a);if(!e){return false}a=[e]}else{if(!Ext.isArray(a)){a=[a]}}function c(){++g;b.remove(e)}h=a.length;for(;d<h;d++){e=a[d];if(j.isSelected(e)){if(j.lastSelected===e){j.lastSelected=b.last();if(j.lastFocused===e){j.setLastFocused(null)}}++l;j.onSelectChange(e,false,k,c)}}j.maybeFireSelectionChange(g>0&&!k);return g===l},doSingleSelect:function(a,b){var d=this,g=false,c=d.selected;if(d.locked){return}if(d.isSelected(a)){return}function e(){d.bulkChange=true;if(c.getCount()>0&&d.doDeselect(d.lastSelected,b)===false){delete d.bulkChange;return false}delete d.bulkChange;c.add(a);d.lastSelected=a;g=true}d.onSelectChange(a,true,b,e);if(g){if(!b&&!d.preventFocus){d.setLastFocused(a)}d.maybeFireSelectionChange(!b)}},setLastFocused:function(c,b){var d=this,a=d.lastFocused;d.lastFocused=c;if(c!==a){d.onLastFocusChanged(a,c,b)}},isFocused:function(a){return a===this.getLastFocused()},maybeFireSelectionChange:function(a){var b=this;if(a&&!b.bulkChange){b.fireEvent("selectionchange",b,b.getSelection())}},getLastSelected:function(){return this.lastSelected},getLastFocused:function(){return this.lastFocused},getSelection:function(){return this.selected.getRange()},getSelectionMode:function(){return this.selectionMode},setSelectionMode:function(a){a=a?a.toUpperCase():"SINGLE";this.selectionMode=this.modes[a]?a:"SINGLE"},isLocked:function(){return this.locked},setLocked:function(a){this.locked=!!a},isRangeSelected:function(h,g){var e=this,a=e.store,d=a.indexOf(h),c=a.indexOf(g),b;if(c<d){b=c;c=d;d=b}for(b=d;b<=c;b++){if(!e.isSelected(a.getAt(b))){return false}}return true},isSelected:function(a){a=Ext.isNumber(a)?this.store.getAt(a):a;return this.selected.contains(a)},hasSelection:function(){return this.selected.getCount()>0},getSelectionId:function(a){return a.internalId},pruneIf:function(){var g=this,d=g.selected,c=[],a=d.length,b,e;if(g.pruneRemoved){for(b=0;b<a;b++){e=d.getAt(b);if(!this.storeHasSelected(e)){c.push(e)}}if(c.length){for(b=0,a=c.length;b<a;b++){d.remove(c[b])}g.maybeFireSelectionChange(true)}}},storeHasSelected:function(b){var d=this.store,c,a,g,e;if(b.hasId()&&d.getById(b)){return true}else{c=d.data.items;a=c.length;g=b.internalId;for(e=0;e<a;++e){if(g===c[e].internalId){return true}}}return false},refresh:function(){var h=this,l=h.store,a,d=[],g=[],c=h.getSelection(),e=c.length,k,j,b=0,m=h.getLastFocused();if(!l){return}for(;b<e;b++){k=c[b];if(l.indexOf(k)!==-1){d.push(k)}else{if(!h.pruneRemoved){a=l.getById(k.getId());if(a){d.push(a)}else{g.push(k)}}}if(h.mode==="SINGLE"&&g.length){break}}if(h.selected.getCount()!=(d.length+g.length)){j=true}h.clearSelections();if(l.indexOf(m)!==-1){h.setLastFocused(m,true)}if(d.length){h.doSelect(d,false,true)}if(g.length){h.selected.addAll(g);if(!h.lastSelected){h.lastSelected=g[g.length-1]}}h.maybeFireSelectionChange(j)},clearSelections:function(){this.selected.clear();this.lastSelected=null;this.setLastFocused(null)},onStoreAdd:Ext.emptyFn,onStoreClear:function(){if(this.selected.getCount()>0){this.clearSelections();this.maybeFireSelectionChange(true)}},onStoreRemove:function(c,b,d,a){var e=this;if(e.selectionStart&&Ext.Array.contains(b,e.selectionStart)){e.selectionStart=null}if(a||e.locked||!e.pruneRemoved){return}e.deselectDeletedRecords(b)},deselectDeletedRecords:function(b){var g=this,d=g.selected,c,e=b.length,h=0,a;for(c=0;c<e;c++){a=b[c];if(d.remove(a)){if(g.lastSelected==a){g.lastSelected=null}if(g.getLastFocused()==a){g.setLastFocused(null)}++h}}if(h){g.maybeFireSelectionChange(true)}},getCount:function(){return this.selected.getCount()},onUpdate:Ext.emptyFn,destroy:Ext.emptyFn,onStoreUpdate:Ext.emptyFn,onStoreRefresh:Ext.emptyFn,onStoreLoad:Ext.emptyFn,onSelectChange:Ext.emptyFn,onLastFocusChanged:function(b,a){this.fireEvent("focuschange",this,b,a)},onEditorKey:Ext.emptyFn,bindComponent:Ext.emptyFn,beforeViewRender:Ext.emptyFn});Ext.define("Ext.selection.DataViewModel",{extend:Ext.selection.Model,deselectOnContainerClick:true,enableKeyNav:true,constructor:function(a){this.addEvents("beforedeselect","beforeselect","deselect","select");this.callParent(arguments)},bindComponent:function(a){var b=this,c={refresh:b.refresh,scope:b};b.view=a;b.bindStore(a.getStore());c[a.triggerEvent]=b.onItemClick;c[a.triggerCtEvent]=b.onContainerClick;a.on(c);if(b.enableKeyNav){b.initKeyNav(a)}},onUpdate:function(b){var a=this.view;if(a&&this.isSelected(b)){a.onItemSelect(b)}},onItemClick:function(b,a,d,c,g){this.selectWithEvent(a,g)},onContainerClick:function(){if(this.deselectOnContainerClick){this.deselectAll()}},initKeyNav:function(a){var b=this;if(!a.rendered){a.on({render:Ext.Function.bind(b.initKeyNav,b,[a]),single:true});return}a.el.set({tabIndex:-1});b.keyNav=new Ext.util.KeyNav({target:a.el,ignoreInputFields:true,down:Ext.pass(b.onNavKey,[1],b),right:Ext.pass(b.onNavKey,[1],b),left:Ext.pass(b.onNavKey,[-1],b),up:Ext.pass(b.onNavKey,[-1],b),scope:b})},onNavKey:function(g){g=g||1;var e=this,b=e.view,d=e.getSelection()[0],c=e.view.store.getCount(),a;if(d){a=b.indexOf(b.getNode(d))+g}else{a=0}if(a<0){a=c-1}else{if(a>=c){a=0}}e.select(a)},onSelectChange:function(b,e,d,h){var g=this,a=g.view,c=e?"select":"deselect";if((d||g.fireEvent("before"+c,g,b))!==false&&h()!==false){if(a){if(e){a.onItemSelect(b)}else{a.onItemDeselect(b)}}if(!d){g.fireEvent(c,g,b)}}},onLastFocusChanged:function(d,b,c){var a=this.view;if(a&&!c&&b){a.focusNode(b);this.fireEvent("focuschange",this,d,b)}},destroy:function(){Ext.destroy(this.keyNav);this.callParent()}});Ext.define("Ext.view.AbstractView",{extend:Ext.Component,mixins:{bindable:Ext.util.Bindable},inheritableStatics:{getRecord:function(a){return this.getBoundView(a).getRecord(a)},getBoundView:function(a){return Ext.getCmp(a.boundView)}},deferInitialRefresh:true,itemCls:Ext.baseCSSPrefix+"dataview-item",loadingText:"Loading...",loadMask:true,loadingUseMsg:true,selectedItemCls:Ext.baseCSSPrefix+"item-selected",emptyText:"",deferEmptyText:true,trackOver:false,blockRefresh:false,preserveScrollOnRefresh:false,last:false,triggerEvent:"itemclick",triggerCtEvent:"containerclick",addCmpEvents:function(){},initComponent:function(){var c=this,a=Ext.isDefined,d=c.itemTpl,b={};if(d){if(Ext.isArray(d)){d=d.join("")}else{if(Ext.isObject(d)){b=Ext.apply(b,d.initialConfig);d=d.html}}if(!c.itemSelector){c.itemSelector="."+c.itemCls}d=Ext.String.format('<tpl for="."><div class="{0}">{1}</div></tpl>',c.itemCls,d);c.tpl=new Ext.XTemplate(d,b)}c.callParent();c.tpl=c.getTpl("tpl");if(c.overItemCls){c.trackOver=true}c.addEvents("beforerefresh","refresh","viewready","itemupdate","itemadd","itemremove");c.addCmpEvents();c.store=Ext.data.StoreManager.lookup(c.store||"ext-empty-store");if(!c.dataSource){c.dataSource=c.store}c.bindStore(c.dataSource,true,"dataSource");if(!c.all){c.all=new Ext.CompositeElementLite()}c.scrollState={top:0,left:0};c.on({scroll:c.onViewScroll,element:"el",scope:c})},onRender:function(){var c=this,b=c.loadMask,a={target:c,msg:c.loadingText,msgCls:c.loadingCls,useMsg:c.loadingUseMsg,store:c.getMaskStore()};c.callParent(arguments);if(b){if(Ext.isObject(b)){a=Ext.apply(a,b)}c.loadMask=new Ext.LoadMask(a);c.loadMask.on({scope:c,beforeshow:c.onMaskBeforeShow,hide:c.onMaskHide})}},finishRender:function(){var a=this;a.callParent(arguments);if(!a.up("[collapsed],[hidden]")){a.doFirstRefresh(a.dataSource)}},onBoxReady:function(){var a=this;a.callParent(arguments);if(!a.firstRefreshDone){a.doFirstRefresh(a.dataSource)}},getMaskStore:function(){return this.store},onMaskBeforeShow:function(){var b=this,a=b.loadingHeight;if(a&&a>b.getHeight()){b.hasLoadingHeight=true;b.oldMinHeight=b.minHeight;b.minHeight=a;b.updateLayout()}},onMaskHide:function(){var a=this;if(!a.destroying&&a.hasLoadingHeight){a.minHeight=a.oldMinHeight;a.updateLayout();delete a.hasLoadingHeight}},beforeRender:function(){this.callParent(arguments);this.getSelectionModel().beforeViewRender(this)},afterRender:function(){this.callParent(arguments);this.getSelectionModel().bindComponent(this)},getSelectionModel:function(){var a=this,b="SINGLE";if(a.simpleSelect){b="SIMPLE"}else{if(a.multiSelect){b="MULTI"}}if(!a.selModel||!a.selModel.events){a.selModel=new Ext.selection.DataViewModel(Ext.apply({allowDeselect:a.allowDeselect,mode:b},a.selModel))}if(!a.selModel.hasRelaySetup){a.relayEvents(a.selModel,["selectionchange","beforeselect","beforedeselect","select","deselect","focuschange"]);a.selModel.hasRelaySetup=true}if(a.disableSelection){a.selModel.locked=true}return a.selModel},refresh:function(){var c=this,h,b,e,d,g,a;if(!c.rendered||c.isDestroyed){return}if(!c.hasListeners.beforerefresh||c.fireEvent("beforerefresh",c)!==false){h=c.getTargetEl();a=c.getViewRange();g=h.dom;if(!c.preserveScrollOnRefresh){b=g.parentNode;e=g.style.display;g.style.display="none";d=g.nextSibling;b.removeChild(g)}if(c.refreshCounter){c.clearViewEl()}else{c.fixedNodes=h.dom.childNodes.length;c.refreshCounter=1}c.tpl.append(h,c.collectData(a,c.all.startIndex));if(a.length<1){if(!this.store.loading&&(!c.deferEmptyText||c.hasFirstRefresh)){Ext.core.DomHelper.insertHtml("beforeEnd",h.dom,c.emptyText)}c.all.clear()}else{c.collectNodes(h.dom);c.updateIndexes(0)}if(c.hasFirstRefresh){if(c.refreshSelmodelOnRefresh!==false){c.selModel.refresh()}else{c.selModel.pruneIf()}}c.hasFirstRefresh=true;if(!c.preserveScrollOnRefresh){b.insertBefore(g,d);g.style.display=e}this.refreshSize();c.fireEvent("refresh",c);if(!c.viewReady){c.viewReady=true;c.fireEvent("viewready",c)}}},collectNodes:function(a){this.all.fill(Ext.query(this.getItemSelector(),Ext.getDom(a)),this.all.startIndex)},getViewRange:function(){return this.dataSource.getRange()},refreshSize:function(){var a=this.getSizeModel();if(a.height.shrinkWrap||a.width.shrinkWrap){this.updateLayout()}},clearViewEl:function(){var b=this,a=b.getTargetEl();if(b.fixedNodes){while(a.dom.childNodes[b.fixedNodes]){a.dom.removeChild(a.dom.childNodes[b.fixedNodes])}}else{a.update("")}b.refreshCounter++},onViewScroll:Ext.emptyFn,onIdChanged:Ext.emptyFn,saveScrollState:function(){if(this.rendered){var b=this.el.dom,a=this.scrollState;a.left=b.scrollLeft;a.top=b.scrollTop}},restoreScrollState:function(){if(this.rendered){var b=this.el.dom,a=this.scrollState;b.scrollLeft=a.left;b.scrollTop=a.top}},prepareData:function(e,d,c){var b,a,g;if(c){b=c.getAssociatedData();for(a in b){if(b.hasOwnProperty(a)){if(!g){e=Ext.Object.chain(e);g=true}e[a]=b[a]}}}return e},collectData:function(c,g){var e=[],d=0,a=c.length,b;for(;d<a;d++){b=c[d];e[d]=this.prepareData(b.data,g+d,b)}return e},bufferRender:function(a,b){var c=this,d=c.renderBuffer||(c.renderBuffer=document.createElement("div"));c.tpl.overwrite(d,c.collectData(a,b));return Ext.DomQuery.select(c.getItemSelector(),d)},getNodeContainer:function(){return this.getTargetEl()},onUpdate:function(e,a){var d=this,b,c;if(d.viewReady){b=d.dataSource.indexOf(a);if(b>-1){c=d.bufferRender([a],b)[0];if(d.getNode(a)){d.all.replaceElement(b,c,true);d.updateIndexes(b,b);d.selModel.onUpdate(a);if(d.hasListeners.itemupdate){d.fireEvent("itemupdate",a,b,c)}return c}}}},onAdd:function(c,b,d){var e=this,a;if(e.rendered){if(e.all.getCount()===0){e.refresh();a=e.all.slice()}else{a=e.doAdd(b,d);if(e.refreshSelmodelOnRefresh!==false){e.selModel.refresh()}e.updateIndexes(d);e.refreshSize()}if(e.hasListeners.itemadd){e.fireEvent("itemadd",b,d,a)}}},doAdd:function(c,d){var j=this,b=j.bufferRender(c,d,true),g=j.all,h=g.getCount(),e,a;if(h===0){for(e=0,a=b.length;e<a;e++){this.getNodeContainer().appendChild(b[e])}}else{if(d<h){if(d===0){g.item(d).insertSibling(b,"before",true)}else{g.item(d-1).insertSibling(b,"after",true)}}else{g.last().insertSibling(b,"after",true)}}g.insert(d,b);return b},onRemove:function(j,b,d){var g=this,h=g.hasListeners.itemremove,e,a,c;if(g.all.getCount()){if(g.dataSource.getCount()===0){if(h){for(e=d.length-1;e>=0;--e){g.fireEvent("itemremove",b[e],d[e])}}g.refresh()}else{for(e=d.length-1;e>=0;--e){a=b[e];c=d[e];g.doRemove(a,c);if(h){g.fireEvent("itemremove",a,c)}}g.updateIndexes(d[0])}this.refreshSize()}},doRemove:function(a,b){this.all.removeElement(b,true)},refreshNode:function(a){this.onUpdate(this.dataSource,this.dataSource.getAt(a))},updateIndexes:function(e,d){var b=this.all.elements,a=this.getViewRange(),c;e=e||0;d=d||((d===0)?0:(b.length-1));for(c=e;c<=d;c++){b[c].viewIndex=c;b[c].viewRecordId=a[c].internalId;if(!b[c].boundView){b[c].boundView=this.id}}},getStore:function(){return this.store},bindStore:function(a,b,d){var c=this;c.mixins.bindable.bindStore.apply(c,arguments);if(!b){c.getSelectionModel().bindStore(a)}if(c.componentLayoutCounter){c.doFirstRefresh(a)}},doFirstRefresh:function(a){var b=this;b.firstRefreshDone=true;if(a&&!a.loading){if(b.deferInitialRefresh){b.applyFirstRefresh()}else{b.refresh()}}},applyFirstRefresh:function(){var a=this;if(a.isDestroyed){return}if(a.up("[isCollapsingOrExpanding]")){Ext.Function.defer(a.applyFirstRefresh,100,a)}else{Ext.Function.defer(function(){if(!a.isDestroyed){a.refresh()}},1)}},onUnbindStore:function(a){this.setMaskBind(null)},onBindStore:function(a,b,c){this.setMaskBind(a);if(!b&&c==="store"){this.bindStore(a,false,"dataSource")}},setMaskBind:function(b){var a=this.loadMask;if(a&&a.bindStore){a.bindStore(b)}},getStoreListeners:function(){var a=this;return{idchanged:a.onIdChanged,refresh:a.onDataRefresh,add:a.onAdd,bulkremove:a.onRemove,update:a.onUpdate,clear:a.refresh}},onDataRefresh:function(){var a=this,b=!a.firstRefreshDone&&(!a.rendered||a.up("[collapsed],[isCollapsingOrExpanding],[hidden]"));if(b){a.deferInitialRefresh=false}else{if(a.blockRefresh!==true){a.firstRefreshDone=true;a.refresh.apply(a,arguments)}}},findItemByChild:function(a){return Ext.fly(a).findParent(this.getItemSelector(),this.getTargetEl())},findTargetByEvent:function(a){return a.getTarget(this.getItemSelector(),this.getTargetEl())},getSelectedNodes:function(){var b=[],a=this.selModel.getSelection(),d=a.length,c=0;for(;c<d;c++){b.push(this.getNode(a[c]))}return b},getRecords:function(c){var b=[],d=0,a=c.length,e=this.dataSource.data;for(;d<a;d++){b[b.length]=e.getByKey(c[d].viewRecordId)}return b},getRecord:function(a){return this.dataSource.data.getByKey(Ext.getDom(a).viewRecordId)},isSelected:function(b){var a=this.getRecord(b);return this.selModel.isSelected(a)},select:function(b,c,a){this.selModel.select(b,c,a)},deselect:function(b,a){this.selModel.deselect(b,a)},getNode:function(a){if((!a&&a!==0)||!this.rendered){return null}if(Ext.isString(a)){return document.getElementById(a)}if(Ext.isNumber(a)){return this.all.elements[a]}if(a.isModel){return this.getNodeByRecord(a)}return a},getNodeByRecord:function(a){var c=this.all.elements,d=c.length,b=0;for(;b<d;b++){if(c[b].viewRecordId===a.internalId){return c[b]}}return null},getNodes:function(c,a){var b=this.all;if(a===undefined){a=b.getCount()}else{a++}return b.slice(c||0,a)},indexOf:function(a){a=this.getNode(a);if(!a&&a!==0){return -1}if(Ext.isNumber(a.viewIndex)){return a.viewIndex}return this.all.indexOf(a)},onDestroy:function(){var a=this;a.all.clear();a.callParent();a.bindStore(null);a.selModel.destroy()},onItemSelect:function(a){var b=this.getNode(a);if(b){Ext.fly(b).addCls(this.selectedItemCls)}},onItemDeselect:function(a){var b=this.getNode(a);if(b){Ext.fly(b).removeCls(this.selectedItemCls)}},getItemSelector:function(){return this.itemSelector}},function(){Ext.deprecate("extjs","4.0",function(){Ext.view.AbstractView.override({getSelectionCount:function(){if(Ext.global.console){Ext.global.console.warn("DataView: getSelectionCount will be removed, please interact with the Ext.selection.DataViewModel")}return this.selModel.getSelection().length},getSelectedRecords:function(){if(Ext.global.console){Ext.global.console.warn("DataView: getSelectedRecords will be removed, please interact with the Ext.selection.DataViewModel")}return this.selModel.getSelection()},select:function(a,b,d){if(Ext.global.console){Ext.global.console.warn("DataView: select will be removed, please access select through a DataView's SelectionModel, ie: view.getSelectionModel().select()")}var c=this.getSelectionModel();return c.select.apply(c,arguments)},clearSelections:function(){if(Ext.global.console){Ext.global.console.warn("DataView: clearSelections will be removed, please access deselectAll through DataView's SelectionModel, ie: view.getSelectionModel().deselectAll()")}var a=this.getSelectionModel();return a.deselectAll()}})})});Ext.define("Ext.view.View",{extend:Ext.view.AbstractView,alternateClassName:"Ext.DataView",alias:"widget.dataview",deferHighlight:Ext.isIE7m?100:0,mouseOverOutBuffer:20,inputTagRe:/^textarea$|^input$/i,inheritableStatics:{EventMap:{mousedown:"MouseDown",mouseup:"MouseUp",click:"Click",dblclick:"DblClick",contextmenu:"ContextMenu",mouseover:"MouseOver",mouseout:"MouseOut",mouseenter:"MouseEnter",mouseleave:"MouseLeave",keydown:"KeyDown",focus:"Focus"}},initComponent:function(){var a=this;a.callParent();if(a.mouseOverOutBuffer){a.handleMouseOverOrOut=Ext.Function.createBuffered(a.handleMouseOverOrOut,a.mouseOverOutBuffer,a);a.lastMouseOverOutEvent=new Ext.EventObjectImpl()}else{if(a.deferHighlight){a.setHighlightedItem=Ext.Function.createBuffered(a.setHighlightedItem,a.deferHighlight,a)}}},addCmpEvents:function(){this.addEvents("beforeitemmousedown","beforeitemmouseup","beforeitemmouseenter","beforeitemmouseleave","beforeitemclick","beforeitemdblclick","beforeitemcontextmenu","beforeitemkeydown","itemmousedown","itemmouseup","itemmouseenter","itemmouseleave","itemclick","itemdblclick","itemcontextmenu","itemkeydown","beforecontainermousedown","beforecontainermouseup","beforecontainermouseover","beforecontainermouseout","beforecontainerclick","beforecontainerdblclick","beforecontainercontextmenu","beforecontainerkeydown","containermouseup","containermouseover","containermouseout","containerclick","containerdblclick","containercontextmenu","containerkeydown","selectionchange","beforeselect","beforedeselect","select","deselect","focuschange","highlightitem","unhighlightitem")},getFocusEl:function(){return this.getTargetEl()},afterRender:function(){var a=this,b=a.mouseOverOutBuffer?a.onMouseOverOut:a.handleMouseOverOrOut;a.callParent();a.mon(a.getTargetEl(),{scope:a,freezeEvent:true,click:a.handleEvent,mousedown:a.handleEvent,mouseup:a.handleEvent,dblclick:a.handleEvent,contextmenu:a.handleEvent,keydown:a.handleEvent,mouseover:b,mouseout:b})},onMouseOverOut:function(b){var a=this;a.lastMouseOverOutEvent.setEvent(b.browserEvent,true);a.handleMouseOverOrOut(a.lastMouseOverOutEvent)},handleMouseOverOrOut:function(d){var c=this,b=d.type==="mouseout",a=d[b?"getRelatedTarget":"getTarget"](c.dataRowSelector||c.itemSelector);if(!c.mouseOverItem||a!==c.mouseoverItem){if(c.mouseOverItem){d.item=c.mouseOverItem;d.newType="mouseleave";c.handleEvent(d)}c.mouseOverItem=a;if(c.mouseOverItem){d.item=c.mouseOverItem;d.newType="mouseenter";c.handleEvent(d)}}},handleEvent:function(c){var b=this,a=c.type=="keydown"&&c.getKey();if(b.processUIEvent(c)!==false){b.processSpecialEvent(c)}if(a===c.SPACE){if(!b.inputTagRe.test(c.getTarget().tagName)){c.stopEvent()}}},processItemEvent:Ext.emptyFn,processContainerEvent:Ext.emptyFn,processSpecialEvent:Ext.emptyFn,processUIEvent:function(h){if(!Ext.getBody().isAncestor(h.target)){return}var i=this,k=h.getTarget(i.getItemSelector(),i.getTargetEl()),a=this.statics().EventMap,g,d,j=h.type,c=h.type,b;if(h.newType){c=h.newType;k=h.item}if(!k&&j=="keydown"){b=i.getSelectionModel();d=b.lastFocused||b.getLastSelected();if(d){k=i.getNode(d,true)}}if(k){if(!d){d=i.getRecord(k)}g=i.indexInStore?i.indexInStore(d):i.indexOf(k);if(!d||i.processItemEvent(d,k,g,h)===false){return false}if((i["onBeforeItem"+a[c]](d,k,g,h)===false)||(i.fireEvent("beforeitem"+c,i,d,k,g,h)===false)||(i["onItem"+a[c]](d,k,g,h)===false)){return false}i.fireEvent("item"+c,i,d,k,g,h)}else{if((i.processContainerEvent(h)===false)||(i["onBeforeContainer"+a[j]](h)===false)||(i.fireEvent("beforecontainer"+j,i,h)===false)||(i["onContainer"+a[j]](h)===false)){return false}i.fireEvent("container"+j,i,h)}return true},onItemMouseEnter:function(a,c,b,d){if(this.trackOver){this.highlightItem(c)}},onItemMouseLeave:function(a,c,b,d){if(this.trackOver){this.clearHighlight()}},onItemMouseDown:Ext.emptyFn,onItemMouseUp:Ext.emptyFn,onItemFocus:Ext.emptyFn,onItemClick:Ext.emptyFn,onItemDblClick:Ext.emptyFn,onItemContextMenu:Ext.emptyFn,onItemKeyDown:Ext.emptyFn,onBeforeItemMouseDown:Ext.emptyFn,onBeforeItemMouseUp:Ext.emptyFn,onBeforeItemFocus:Ext.emptyFn,onBeforeItemMouseEnter:Ext.emptyFn,onBeforeItemMouseLeave:Ext.emptyFn,onBeforeItemClick:Ext.emptyFn,onBeforeItemDblClick:Ext.emptyFn,onBeforeItemContextMenu:Ext.emptyFn,onBeforeItemKeyDown:Ext.emptyFn,onContainerMouseDown:Ext.emptyFn,onContainerMouseUp:Ext.emptyFn,onContainerMouseOver:Ext.emptyFn,onContainerMouseOut:Ext.emptyFn,onContainerClick:Ext.emptyFn,onContainerDblClick:Ext.emptyFn,onContainerContextMenu:Ext.emptyFn,onContainerKeyDown:Ext.emptyFn,onBeforeContainerMouseDown:Ext.emptyFn,onBeforeContainerMouseUp:Ext.emptyFn,onBeforeContainerMouseOver:Ext.emptyFn,onBeforeContainerMouseOut:Ext.emptyFn,onBeforeContainerClick:Ext.emptyFn,onBeforeContainerDblClick:Ext.emptyFn,onBeforeContainerContextMenu:Ext.emptyFn,onBeforeContainerKeyDown:Ext.emptyFn,setHighlightedItem:function(c){var b=this,a=b.highlightedItem;if(a!=c){if(a){Ext.fly(a).removeCls(b.overItemCls);b.fireEvent("unhighlightitem",b,a)}b.highlightedItem=c;if(c){Ext.fly(c).addCls(b.overItemCls);b.fireEvent("highlightitem",b,c)}}},highlightItem:function(a){this.setHighlightedItem(a)},clearHighlight:function(){this.setHighlightedItem(undefined)},onUpdate:function(b,a){var g=this,e,c,d;if(g.viewReady){e=g.getNode(a);c=g.callParent(arguments);d=g.highlightedItem;if(d&&d===e){delete g.highlightedItem;if(c){g.highlightItem(c)}}}},refresh:function(){this.clearHighlight();this.callParent(arguments)},focusNode:function(i){var g=this,e=g.getNode(i,true),d=g.el,a=0,b=0,h=d.getRegion(),c;h.bottom=h.top+d.dom.clientHeight;h.right=h.left+d.dom.clientWidth;if(e){c=Ext.fly(e).getRegion();if(c.top<h.top){a=c.top-h.top}else{if(c.bottom>h.bottom){a=c.bottom-h.bottom}}if(c.left<h.left){b=c.left-h.left}else{if(c.right>h.right){b=c.right-h.right}}if(b||a){g.scrollBy(b,a,false)}d.focus()}}});Ext.define("Ext.layout.component.BoundList",{extend:Ext.layout.component.Auto,alias:"layout.boundlist",type:"component",beginLayout:function(d){var c=this,a=c.owner,b=a.pagingToolbar;c.callParent(arguments);if(a.floating){d.savedXY=a.getXY();a.setXY([0,-9999])}if(b){d.toolbarContext=d.context.getCmp(b)}d.listContext=d.getEl("listEl")},beginLayoutCycle:function(b){var a=this.owner;this.callParent(arguments);if(b.heightModel.auto){a.el.setHeight("auto");a.listEl.setHeight("auto")}},getLayoutItems:function(){var a=this.owner.pagingToolbar;return a?[a]:[]},isValidParent:function(){return true},finishedLayout:function(a){var b=a.savedXY;this.callParent(arguments);if(b){this.owner.setXY(b)}},measureContentWidth:function(a){return this.owner.listEl.getWidth()},measureContentHeight:function(a){return this.owner.listEl.getHeight()},publishInnerHeight:function(c,a){var b=c.toolbarContext,d=0;if(b){d=b.getProp("height")}if(d===undefined){this.done=false}else{c.listContext.setHeight(a-c.getFrameInfo().height-d)}},calculateOwnerHeightFromContentHeight:function(c){var a=this.callParent(arguments),b=c.toolbarContext;if(b){a+=b.getProp("height")}return a}});Ext.define("Ext.toolbar.TextItem",{extend:Ext.toolbar.Item,alias:"widget.tbtext",alternateClassName:"Ext.Toolbar.TextItem",text:"",renderTpl:"{text}",baseCls:Ext.baseCSSPrefix+"toolbar-text",beforeRender:function(){var a=this;a.callParent();Ext.apply(a.renderData,{text:a.text})},setText:function(b){var a=this;a.text=b;if(a.rendered){a.el.update(b);a.updateLayout()}}});Ext.define("Ext.form.field.Spinner",{extend:Ext.form.field.Trigger,alias:"widget.spinnerfield",alternateClassName:"Ext.form.Spinner",trigger1Cls:Ext.baseCSSPrefix+"form-spinner-up",trigger2Cls:Ext.baseCSSPrefix+"form-spinner-down",spinUpEnabled:true,spinDownEnabled:true,keyNavEnabled:true,mouseWheelEnabled:true,repeatTriggerClick:true,onSpinUp:Ext.emptyFn,onSpinDown:Ext.emptyFn,triggerTpl:'<td style="{triggerStyle}" class="{triggerCls}"><div class="'+Ext.baseCSSPrefix+"trigger-index-0 "+Ext.baseCSSPrefix+"form-trigger "+Ext.baseCSSPrefix+'form-spinner-up {spinnerUpCls} {childElCls}" role="button"></div><div class="'+Ext.baseCSSPrefix+"trigger-index-1 "+Ext.baseCSSPrefix+"form-trigger "+Ext.baseCSSPrefix+'form-spinner-down {spinnerDownCls} {childElCls}" role="button"></div></td></tr>',initComponent:function(){this.callParent();this.addEvents("spin","spinup","spindown")},onRender:function(){var b=this,a;b.callParent(arguments);a=b.triggerEl;b.spinUpEl=a.item(0);b.spinDownEl=a.item(1);b.triggerCell=b.spinUpEl.parent();if(b.keyNavEnabled){b.spinnerKeyNav=new Ext.util.KeyNav(b.inputEl,{scope:b,up:b.spinUp,down:b.spinDown})}if(b.mouseWheelEnabled){b.mon(b.bodyEl,"mousewheel",b.onMouseWheel,b)}},getSubTplMarkup:function(b){var c=this,a=b.childElCls,d=Ext.form.field.Base.prototype.getSubTplMarkup.apply(c,arguments);return'<table id="'+c.id+'-triggerWrap" class="'+Ext.baseCSSPrefix+"form-trigger-wrap"+a+'" cellpadding="0" cellspacing="0"><tbody><tr><td id="'+c.id+'-inputCell" class="'+Ext.baseCSSPrefix+"form-trigger-input-cell"+a+'">'+d+"</td>"+c.getTriggerMarkup()+"</tbody></table>"},getTriggerMarkup:function(){return this.getTpl("triggerTpl").apply(this.getTriggerData())},getTriggerData:function(){var a=this,b=(a.readOnly||a.hideTrigger);return{triggerCls:Ext.baseCSSPrefix+"trigger-cell",triggerStyle:b?"display:none":"",spinnerUpCls:!a.spinUpEnabled?a.trigger1Cls+"-disabled":"",spinnerDownCls:!a.spinDownEnabled?a.trigger2Cls+"-disabled":""}},getTriggerWidth:function(){var b=this,a=0;if(b.triggerWrap&&!b.hideTrigger&&!b.readOnly){a=b.triggerWidth}return a},onTrigger1Click:function(){this.spinUp()},onTrigger2Click:function(){this.spinDown()},onTriggerWrapMouseup:function(){this.inputEl.focus()},spinUp:function(){var a=this;if(a.spinUpEnabled&&!a.disabled){a.fireEvent("spin",a,"up");a.fireEvent("spinup",a);a.onSpinUp()}},spinDown:function(){var a=this;if(a.spinDownEnabled&&!a.disabled){a.fireEvent("spin",a,"down");a.fireEvent("spindown",a);a.onSpinDown()}},setSpinUpEnabled:function(a){var b=this,c=b.spinUpEnabled;b.spinUpEnabled=a;if(c!==a&&b.rendered){b.spinUpEl[a?"removeCls":"addCls"](b.trigger1Cls+"-disabled")}},setSpinDownEnabled:function(a){var b=this,c=b.spinDownEnabled;b.spinDownEnabled=a;if(c!==a&&b.rendered){b.spinDownEl[a?"removeCls":"addCls"](b.trigger2Cls+"-disabled")}},onMouseWheel:function(b){var a=this,c;if(a.hasFocus){c=b.getWheelDelta();if(c>0){a.spinUp()}else{if(c<0){a.spinDown()}}b.stopEvent()}},onDestroy:function(){Ext.destroyMembers(this,"spinnerKeyNav","spinUpEl","spinDownEl");this.callParent()}});Ext.define("Ext.form.field.Number",{extend:Ext.form.field.Spinner,alias:"widget.numberfield",alternateClassName:["Ext.form.NumberField","Ext.form.Number"],allowDecimals:true,decimalSeparator:".",submitLocaleSeparator:true,decimalPrecision:2,minValue:Number.NEGATIVE_INFINITY,maxValue:Number.MAX_VALUE,step:1,minText:"The minimum value for this field is {0}",maxText:"The maximum value for this field is {0}",nanText:"{0} is not a valid number",negativeText:"The value cannot be negative",baseChars:"0123456789",autoStripChars:false,initComponent:function(){var a=this;a.callParent();a.setMinValue(a.minValue);a.setMaxValue(a.maxValue)},getErrors:function(c){var b=this,e=b.callParent(arguments),d=Ext.String.format,a;c=Ext.isDefined(c)?c:this.processRawValue(this.getRawValue());if(c.length<1){return e}c=String(c).replace(b.decimalSeparator,".");if(isNaN(c)){e.push(d(b.nanText,c))}a=b.parseValue(c);if(b.minValue===0&&a<0){e.push(this.negativeText)}else{if(a<b.minValue){e.push(d(b.minText,b.minValue))}}if(a>b.maxValue){e.push(d(b.maxText,b.maxValue))}return e},rawToValue:function(b){var a=this.fixPrecision(this.parseValue(b));if(a===null){a=b||null}return a},valueToRaw:function(c){var b=this,a=b.decimalSeparator;c=b.parseValue(c);c=b.fixPrecision(c);c=Ext.isNumber(c)?c:parseFloat(String(c).replace(a,"."));c=isNaN(c)?"":String(c).replace(".",a);return c},getSubmitValue:function(){var a=this,b=a.callParent();if(!a.submitLocaleSeparator){b=b.replace(a.decimalSeparator,".")}return b},onChange:function(){this.toggleSpinners();this.callParent(arguments)},toggleSpinners:function(){var c=this,d=c.getValue(),b=d===null,a;if(c.spinUpEnabled||c.spinUpDisabledByToggle){a=b||d<c.maxValue;c.setSpinUpEnabled(a,true)}if(c.spinDownEnabled||c.spinDownDisabledByToggle){a=b||d>c.minValue;c.setSpinDownEnabled(a,true)}},setMinValue:function(b){var a=this,c;a.minValue=Ext.Number.from(b,Number.NEGATIVE_INFINITY);a.toggleSpinners();if(a.disableKeyFilter!==true){c=a.baseChars+"";if(a.allowDecimals){c+=a.decimalSeparator}if(a.minValue<0){c+="-"}c=Ext.String.escapeRegex(c);a.maskRe=new RegExp("["+c+"]");if(a.autoStripChars){a.stripCharsRe=new RegExp("[^"+c+"]","gi")}}},setMaxValue:function(a){this.maxValue=Ext.Number.from(a,Number.MAX_VALUE);this.toggleSpinners()},parseValue:function(a){a=parseFloat(String(a).replace(this.decimalSeparator,"."));return isNaN(a)?null:a},fixPrecision:function(d){var c=this,b=isNaN(d),a=c.decimalPrecision;if(b||!d){return b?"":d}else{if(!c.allowDecimals||a<=0){a=0}}return parseFloat(Ext.Number.toFixed(parseFloat(d),a))},beforeBlur:function(){var b=this,a=b.parseValue(b.getRawValue());if(!Ext.isEmpty(a)){b.setValue(a)}},setSpinUpEnabled:function(b,a){this.callParent(arguments);if(!a){delete this.spinUpDisabledByToggle}else{this.spinUpDisabledByToggle=!b}},onSpinUp:function(){var a=this;if(!a.readOnly){a.setSpinValue(Ext.Number.constrain(a.getValue()+a.step,a.minValue,a.maxValue))}},setSpinDownEnabled:function(b,a){this.callParent(arguments);if(!a){delete this.spinDownDisabledByToggle}else{this.spinDownDisabledByToggle=!b}},onSpinDown:function(){var a=this;if(!a.readOnly){a.setSpinValue(Ext.Number.constrain(a.getValue()-a.step,a.minValue,a.maxValue))}},setSpinValue:function(c){var b=this,a;if(b.enforceMaxLength){if(b.fixPrecision(c).toString().length>b.maxLength){return}}b.setValue(c)}});Ext.define("Ext.toolbar.Paging",{extend:Ext.toolbar.Toolbar,alias:"widget.pagingtoolbar",alternateClassName:"Ext.PagingToolbar",mixins:{bindable:Ext.util.Bindable},displayInfo:false,prependButtons:false,displayMsg:"Displaying {0} - {1} of {2}",emptyMsg:"No data to display",beforePageText:"Page",afterPageText:"of {0}",firstText:"First Page",prevText:"Previous Page",nextText:"Next Page",lastText:"Last Page",refreshText:"Refresh",inputItemWidth:30,getPagingItems:function(){var a=this;return[{itemId:"first",tooltip:a.firstText,overflowText:a.firstText,iconCls:Ext.baseCSSPrefix+"tbar-page-first",disabled:true,handler:a.moveFirst,scope:a},{itemId:"prev",tooltip:a.prevText,overflowText:a.prevText,iconCls:Ext.baseCSSPrefix+"tbar-page-prev",disabled:true,handler:a.movePrevious,scope:a},"-",a.beforePageText,{xtype:"numberfield",itemId:"inputItem",name:"inputItem",cls:Ext.baseCSSPrefix+"tbar-page-number",allowDecimals:false,minValue:1,hideTrigger:true,enableKeyEvents:true,keyNavEnabled:false,selectOnFocus:true,submitValue:false,isFormField:false,width:a.inputItemWidth,margins:"-1 2 3 2",listeners:{scope:a,keydown:a.onPagingKeyDown,blur:a.onPagingBlur}},{xtype:"tbtext",itemId:"afterTextItem",text:Ext.String.format(a.afterPageText,1)},"-",{itemId:"next",tooltip:a.nextText,overflowText:a.nextText,iconCls:Ext.baseCSSPrefix+"tbar-page-next",disabled:true,handler:a.moveNext,scope:a},{itemId:"last",tooltip:a.lastText,overflowText:a.lastText,iconCls:Ext.baseCSSPrefix+"tbar-page-last",disabled:true,handler:a.moveLast,scope:a},"-",{itemId:"refresh",tooltip:a.refreshText,overflowText:a.refreshText,iconCls:Ext.baseCSSPrefix+"tbar-loading",handler:a.doRefresh,scope:a}]},initComponent:function(){var b=this,c=b.getPagingItems(),a=b.items||b.buttons||[];if(b.prependButtons){b.items=a.concat(c)}else{b.items=c.concat(a)}delete b.buttons;if(b.displayInfo){b.items.push("->");b.items.push({xtype:"tbtext",itemId:"displayItem"})}b.callParent();b.addEvents("change","beforechange");b.on("beforerender",b.onLoad,b,{single:true});b.bindStore(b.store||"ext-empty-store",true)},updateInfo:function(){var e=this,c=e.child("#displayItem"),a=e.store,b=e.getPageData(),d,g;if(c){d=a.getCount();if(d===0){g=e.emptyMsg}else{g=Ext.String.format(e.displayMsg,b.fromRecord,b.toRecord,b.total)}c.setText(g)}},onLoad:function(){var g=this,d,b,c,a,e,h;e=g.store.getCount();h=e===0;if(!h){d=g.getPageData();b=d.currentPage;c=d.pageCount;a=Ext.String.format(g.afterPageText,isNaN(c)?1:c)}else{b=0;c=0;a=Ext.String.format(g.afterPageText,0)}Ext.suspendLayouts();g.child("#afterTextItem").setText(a);g.child("#inputItem").setDisabled(h).setValue(b);g.child("#first").setDisabled(b===1||h);g.child("#prev").setDisabled(b===1||h);g.child("#next").setDisabled(b===c||h);g.child("#last").setDisabled(b===c||h);g.child("#refresh").enable();g.updateInfo();Ext.resumeLayouts(true);if(g.rendered){g.fireEvent("change",g,d)}},getPageData:function(){var b=this.store,a=b.getTotalCount();return{total:a,currentPage:b.currentPage,pageCount:Math.ceil(a/b.pageSize),fromRecord:((b.currentPage-1)*b.pageSize)+1,toRecord:Math.min(b.currentPage*b.pageSize,a)}},onLoadError:function(){if(!this.rendered){return}this.child("#refresh").enable()},readPageFromInput:function(b){var a=this.child("#inputItem").getValue(),c=parseInt(a,10);if(!a||isNaN(c)){this.child("#inputItem").setValue(b.currentPage);return false}return c},onPagingFocus:function(){this.child("#inputItem").select()},onPagingBlur:function(b){var a=this.getPageData().currentPage;this.child("#inputItem").setValue(a)},onPagingKeyDown:function(i,h){var d=this,b=h.getKey(),c=d.getPageData(),a=h.shiftKey?10:1,g;if(b==h.RETURN){h.stopEvent();g=d.readPageFromInput(c);if(g!==false){g=Math.min(Math.max(1,g),c.pageCount);if(d.fireEvent("beforechange",d,g)!==false){d.store.loadPage(g)}}}else{if(b==h.HOME||b==h.END){h.stopEvent();g=b==h.HOME?1:c.pageCount;i.setValue(g)}else{if(b==h.UP||b==h.PAGE_UP||b==h.DOWN||b==h.PAGE_DOWN){h.stopEvent();g=d.readPageFromInput(c);if(g){if(b==h.DOWN||b==h.PAGE_DOWN){a*=-1}g+=a;if(g>=1&&g<=c.pageCount){i.setValue(g)}}}}}},beforeLoad:function(){if(this.rendered&&this.refresh){this.refresh.disable()}},moveFirst:function(){if(this.fireEvent("beforechange",this,1)!==false){this.store.loadPage(1)}},movePrevious:function(){var b=this,a=b.store.currentPage-1;if(a>0){if(b.fireEvent("beforechange",b,a)!==false){b.store.previousPage()}}},moveNext:function(){var c=this,b=c.getPageData().pageCount,a=c.store.currentPage+1;if(a<=b){if(c.fireEvent("beforechange",c,a)!==false){c.store.nextPage()}}},moveLast:function(){var b=this,a=b.getPageData().pageCount;if(b.fireEvent("beforechange",b,a)!==false){b.store.loadPage(a)}},doRefresh:function(){var a=this,b=a.store.currentPage;if(a.fireEvent("beforechange",a,b)!==false){a.store.loadPage(b)}},getStoreListeners:function(){return{beforeload:this.beforeLoad,load:this.onLoad,exception:this.onLoadError}},unbind:function(a){this.bindStore(null)},bind:function(a){this.bindStore(a)},onDestroy:function(){this.unbind();this.callParent()}});Ext.define("Ext.view.BoundList",{extend:Ext.view.View,alias:"widget.boundlist",alternateClassName:"Ext.BoundList",pageSize:0,baseCls:Ext.baseCSSPrefix+"boundlist",itemCls:Ext.baseCSSPrefix+"boundlist-item",listItemCls:"",shadow:false,trackOver:true,refreshed:0,deferInitialRefresh:false,componentLayout:"boundlist",childEls:["listEl"],renderTpl:['<div id="{id}-listEl" class="{baseCls}-list-ct ',Ext.dom.Element.unselectableCls,'" style="overflow:auto"></div>',"{%","var me=values.$comp, pagingToolbar=me.pagingToolbar;","if (pagingToolbar) {","pagingToolbar.ownerLayout = me.componentLayout;","Ext.DomHelper.generateMarkup(pagingToolbar.getRenderTree(), out);","}","%}",{disableFormats:true}],initComponent:function(){var b=this,a=b.baseCls,c=b.itemCls;b.selectedItemCls=a+"-selected";b.overItemCls=a+"-item-over";b.itemSelector="."+c;if(b.floating){b.addCls(a+"-floating")}if(!b.tpl){b.tpl=new Ext.XTemplate('<ul class="'+Ext.plainListCls+'"><tpl for=".">','<li role="option" unselectable="on" class="'+c+'">'+b.getInnerTpl(b.displayField)+"</li>","</tpl></ul>")}else{if(Ext.isString(b.tpl)){b.tpl=new Ext.XTemplate(b.tpl)}}if(b.pageSize){b.pagingToolbar=b.createPagingToolbar()}b.callParent()},beforeRender:function(){var a=this;a.callParent(arguments);if(a.up("menu")){a.addCls(Ext.baseCSSPrefix+"menu")}},getRefOwner:function(){return this.pickerField},getRefItems:function(){return this.pagingToolbar?[this.pagingToolbar]:[]},createPagingToolbar:function(){return Ext.widget("pagingtoolbar",{id:this.id+"-paging-toolbar",pageSize:this.pageSize,store:this.dataSource,border:false,ownerCt:this,ownerLayout:this.getComponentLayout()})},finishRenderChildren:function(){var a=this.pagingToolbar;this.callParent(arguments);if(a){a.finishRender()}},refresh:function(){var b=this,a=b.pagingToolbar,c=b.rendered;b.callParent();if(c&&a&&a.rendered&&!b.preserveScrollOnRefresh){b.el.appendChild(a.el)}if(c&&Ext.isIE6&&Ext.isStrict){b.listEl.repaint()}},bindStore:function(a,b){var c=this.pagingToolbar;this.callParent(arguments);if(c){c.bindStore(a,b)}},getTargetEl:function(){return this.listEl||this.el},getInnerTpl:function(a){return"{"+a+"}"},onDestroy:function(){Ext.destroyMembers(this,"pagingToolbar","listEl");this.callParent()}});Ext.define("Ext.view.BoundListKeyNav",{extend:Ext.util.KeyNav,constructor:function(b,a){var c=this;c.boundList=a.boundList;c.callParent([b,Ext.apply({},a,c.defaultHandlers)])},defaultHandlers:{up:function(){var e=this,b=e.boundList,d=b.all,g=b.highlightedItem,c=g?b.indexOf(g):-1,a=c>0?c-1:d.getCount()-1;e.highlightAt(a)},down:function(){var e=this,b=e.boundList,d=b.all,g=b.highlightedItem,c=g?b.indexOf(g):-1,a=c<d.getCount()-1?c+1:0;e.highlightAt(a)},pageup:function(){},pagedown:function(){},home:function(){this.highlightAt(0)},end:function(){var a=this;a.highlightAt(a.boundList.all.getCount()-1)},enter:function(a){this.selectHighlighted(a)}},highlightAt:function(b){var a=this.boundList,c=a.all.item(b);if(c){c=c.dom;a.highlightItem(c);a.getTargetEl().scrollChildIntoView(c,false)}},selectHighlighted:function(g){var d=this,b=d.boundList,c=b.highlightedItem,a=b.getSelectionModel();if(c){a.selectWithEvent(b.getRecord(c),g)}}});Ext.define("Ext.layout.component.field.ComboBox",{extend:Ext.layout.component.field.Trigger,alias:"layout.combobox",type:"combobox",startingWidth:null,getTextWidth:function(){var h=this,b=h.owner,l=b.store,j=b.displayField,d=l.data.length,k="",e=0,c=0,g,m,a;for(;e<d;e++){m=l.getAt(e).data[j];g=m.length;if(g>c){c=g;k=m}}a=Math.max(h.callParent(arguments),b.inputEl.getTextWidth(k+b.growAppend));if(!h.startingWidth||b.removingRecords){h.startingWidth=a;if(a<b.growMin){b.defaultListConfig.minWidth=b.growMin}b.removingRecords=false}return(a<h.startingWidth)?h.startingWidth:a}});Ext.define("Ext.form.field.ComboBox",{extend:Ext.form.field.Picker,alternateClassName:"Ext.form.ComboBox",alias:["widget.combobox","widget.combo"],mixins:{bindable:Ext.util.Bindable},componentLayout:"combobox",triggerCls:Ext.baseCSSPrefix+"form-arrow-trigger",hiddenName:"",hiddenDataCls:Ext.baseCSSPrefix+"hide-display "+Ext.baseCSSPrefix+"form-data-hidden",fieldSubTpl:['<div class="{hiddenDataCls}" role="presentation"></div>','<input id="{id}" type="{type}" {inputAttrTpl} class="{fieldCls} {typeCls} {editableCls}" autocomplete="off"','<tpl if="value"> value="{[Ext.util.Format.htmlEncode(values.value)]}"</tpl>','<tpl if="name"> name="{name}"</tpl>','<tpl if="placeholder"> placeholder="{placeholder}"</tpl>','<tpl if="size"> size="{size}"</tpl>','<tpl if="maxLength !== undefined"> maxlength="{maxLength}"</tpl>','<tpl if="readOnly"> readonly="readonly"</tpl>','<tpl if="disabled"> disabled="disabled"</tpl>','<tpl if="tabIdx"> tabIndex="{tabIdx}"</tpl>','<tpl if="fieldStyle"> style="{fieldStyle}"</tpl>',"/>",{compiled:true,disableFormats:true}],getSubTplData:function(){var a=this;Ext.applyIf(a.subTplData,{hiddenDataCls:a.hiddenDataCls});return a.callParent(arguments)},afterRender:function(){var a=this;a.callParent(arguments);a.setHiddenValue(a.value)},multiSelect:false,delimiter:", ",displayField:"text",triggerAction:"all",allQuery:"",queryParam:"query",queryMode:"remote",queryCaching:true,pageSize:0,autoSelect:true,typeAhead:false,typeAheadDelay:250,selectOnTab:true,forceSelection:false,growToLongestValue:true,defaultListConfig:{loadingHeight:70,minWidth:70,maxHeight:300,shadow:"sides"},ignoreSelection:0,removingRecords:null,resizeComboToGrow:function(){var a=this;return a.grow&&a.growToLongestValue},initComponent:function(){var e=this,c=Ext.isDefined,b=e.store,d=e.transform,a,g;Ext.applyIf(e.renderSelectors,{hiddenDataEl:"."+e.hiddenDataCls.split(" ").join(".")});this.addEvents("beforequery","select","beforeselect","beforedeselect");if(d){a=Ext.getDom(d);if(a){if(!e.store){b=Ext.Array.map(Ext.Array.from(a.options),function(h){return[h.value,h.text]})}if(!e.name){e.name=a.name}if(!("value" in e)){e.value=a.value}}}e.bindStore(b||"ext-empty-store",true);b=e.store;if(b.autoCreated){e.queryMode="local";e.valueField=e.displayField="field1";if(!b.expanded){e.displayField="field2"}}e.queryFilter=new Ext.util.Filter({id:e.id+"-query-filter",disabled:true,root:"data",property:e.displayField});b.filter(e.queryFilter);if(!c(e.valueField)){e.valueField=e.displayField}g=e.queryMode==="local";if(!c(e.queryDelay)){e.queryDelay=g?10:500}if(!c(e.minChars)){e.minChars=g?0:4}if(!e.displayTpl){e.displayTpl=new Ext.XTemplate('<tpl for=".">{[typeof values === "string" ? values : values["'+e.displayField+'"]]}<tpl if="xindex < xcount">'+e.delimiter+"</tpl></tpl>")}else{if(Ext.isString(e.displayTpl)){e.displayTpl=new Ext.XTemplate(e.displayTpl)}}e.callParent();e.doQueryTask=new Ext.util.DelayedTask(e.doRawQuery,e);if(e.store.getCount()>0){e.setValue(e.value)}if(a){e.render(a.parentNode,a);Ext.removeNode(a);delete e.renderTo}},getStore:function(){return this.store},beforeBlur:function(){this.doQueryTask.cancel();this.assertValue()},assertValue:function(){var b=this,c=b.getRawValue(),d,a;if(b.forceSelection){if(b.multiSelect){if(c!==b.getDisplayValue()){b.setValue(b.lastSelection)}}else{d=b.findRecordByDisplay(c);if(d){a=b.value;if(!b.findRecordByValue(a)){b.select(d,true)}}else{b.setValue(b.lastSelection)}}}b.collapse()},onTypeAhead:function(){var e=this,d=e.displayField,b=e.store.findRecord(d,e.getRawValue()),c=e.getPicker(),g,a,h;if(b){g=b.get(d);a=g.length;h=e.getRawValue().length;c.highlightItem(c.getNode(b));if(h!==0&&h!==a){e.setRawValue(g);e.selectText(h,g.length)}}},resetToDefault:Ext.emptyFn,beforeReset:function(){this.callParent();if(!this.queryFilter.disabled){this.queryFilter.disabled=true;this.store.filter()}},onUnbindStore:function(a){var c=this,b=c.picker;c.store.removeFilter(c.queryFilter);if(!a&&b){b.bindStore(null)}},onBindStore:function(a,c){var b=this.picker;if(!c){this.resetToDefault();a.filter(this.queryFilter)}if(b){b.bindStore(a)}},getStoreListeners:function(){var a=this;return{beforeload:a.onBeforeLoad,clear:a.onClear,datachanged:a.onDataChanged,load:a.onLoad,exception:a.onException,remove:a.onRemove}},onBeforeLoad:function(){++this.ignoreSelection},onDataChanged:function(){var a=this;if(a.resizeComboToGrow()){a.updateLayout()}},onClear:function(){var a=this;if(a.resizeComboToGrow()){a.removingRecords=true;a.onDataChanged()}},onRemove:function(){var a=this;if(a.resizeComboToGrow()){a.removingRecords=true}},onException:function(){if(this.ignoreSelection>0){--this.ignoreSelection}this.collapse()},onLoad:function(){var a=this,b=a.value;if(a.ignoreSelection>0){--a.ignoreSelection}if(a.rawQuery){a.rawQuery=false;a.syncSelection();if(a.picker&&!a.picker.getSelectionModel().hasSelection()){a.doAutoSelect()}}else{if(a.value||a.value===0){a.setValue(a.value)}else{if(a.store.getCount()){a.doAutoSelect()}else{a.setValue(a.value)}}}},doRawQuery:function(){this.doQuery(this.getRawValue(),false,true)},doQuery:function(h,c,e){h=h||"";var d=this,b={query:h,forceAll:c,combo:d,cancel:false},a=d.store,g=d.queryMode==="local";if(d.fireEvent("beforequery",b)===false||b.cancel){return false}h=b.query;c=b.forceAll;if(c||(h.length>=d.minChars)){d.expand();if(!d.queryCaching||d.lastQuery!==h){d.lastQuery=h;if(g){if(h||!c){d.queryFilter.disabled=false;d.queryFilter.setValue(d.enableRegEx?new RegExp(h):h)}else{d.queryFilter.disabled=true}a.filter()}else{d.rawQuery=e;if(d.pageSize){d.loadPage(1)}else{a.load({params:d.getParams(h)})}}}if(d.getRawValue()!==d.getDisplayValue()){d.ignoreSelection++;d.picker.getSelectionModel().deselectAll();d.ignoreSelection--}if(g){d.doAutoSelect()}if(d.typeAhead){d.doTypeAhead()}}return true},loadPage:function(a){this.store.loadPage(a,{params:this.getParams(this.lastQuery)})},onPageChange:function(b,a){this.loadPage(a);return false},getParams:function(c){var b={},a=this.queryParam;if(a){b[a]=c}return b},doAutoSelect:function(){var b=this,a=b.picker,c,d;if(a&&b.autoSelect&&b.store.getCount()>0){c=a.getSelectionModel().lastSelected;d=a.getNode(c||0);if(d){a.highlightItem(d);a.listEl.scrollChildIntoView(d,false)}}},doTypeAhead:function(){if(!this.typeAheadTask){this.typeAheadTask=new Ext.util.DelayedTask(this.onTypeAhead,this)}if(this.lastKey!=Ext.EventObject.BACKSPACE&&this.lastKey!=Ext.EventObject.DELETE){this.typeAheadTask.delay(this.typeAheadDelay)}},onTriggerClick:function(){var a=this;if(!a.readOnly&&!a.disabled){if(a.isExpanded){a.collapse()}else{a.onFocus({});if(a.triggerAction==="all"){a.doQuery(a.allQuery,true)}else{a.doQuery(a.getRawValue(),false,true)}}a.inputEl.focus()}},onPaste:function(){var a=this;if(!a.readOnly&&!a.disabled&&a.editable){a.doQueryTask.delay(a.queryDelay)}},onKeyUp:function(d,b){var c=this,a=d.getKey();if(!c.readOnly&&!c.disabled&&c.editable){c.lastKey=a;if(!d.isSpecialKey()||a==d.BACKSPACE||a==d.DELETE){c.doQueryTask.delay(c.queryDelay)}}if(c.enableKeyEvents){c.callParent(arguments)}},initEvents:function(){var a=this;a.callParent();if(!a.enableKeyEvents){a.mon(a.inputEl,"keyup",a.onKeyUp,a)}a.mon(a.inputEl,"paste",a.onPaste,a)},onDestroy:function(){this.bindStore(null);this.callParent()},onAdded:function(){var a=this;a.callParent(arguments);if(a.picker){a.picker.ownerCt=a.up("[floating]");a.picker.registerWithOwnerCt()}},createPicker:function(){var c=this,b,a=Ext.apply({xtype:"boundlist",pickerField:c,selModel:{mode:c.multiSelect?"SIMPLE":"SINGLE"},floating:true,hidden:true,store:c.store,displayField:c.displayField,focusOnToFront:false,pageSize:c.pageSize,tpl:c.tpl},c.listConfig,c.defaultListConfig);b=c.picker=Ext.widget(a);if(c.pageSize){b.pagingToolbar.on("beforechange",c.onPageChange,c)}c.mon(b,{itemclick:c.onItemClick,refresh:c.onListRefresh,scope:c});c.mon(b.getSelectionModel(),{beforeselect:c.onBeforeSelect,beforedeselect:c.onBeforeDeselect,selectionchange:c.onListSelectionChange,scope:c});return b},alignPicker:function(){var b=this,a=b.getPicker(),e=b.getPosition()[1]-Ext.getBody().getScroll().top,d=Ext.Element.getViewHeight()-e-b.getHeight(),c=Math.max(e,d);if(a.height){delete a.height;a.updateLayout()}if(a.getHeight()>c-5){a.setHeight(c-5)}b.callParent()},onListRefresh:function(){this.alignPicker();this.syncSelection()},onItemClick:function(c,a){var e=this,d=e.picker.getSelectionModel().getSelection(),b=e.valueField;if(!e.multiSelect&&d.length){if(a.get(b)===d[0].get(b)){e.displayTplData=[a.data];e.setRawValue(e.getDisplayValue());e.collapse()}}},onBeforeSelect:function(b,a){return this.fireEvent("beforeselect",this,a,a.index)},onBeforeDeselect:function(b,a){return this.fireEvent("beforedeselect",this,a,a.index)},onListSelectionChange:function(b,d){var a=this,e=a.multiSelect,c=d.length>0;if(!a.ignoreSelection&&a.isExpanded){if(!e){Ext.defer(a.collapse,1,a)}if(e||c){a.setValue(d,false)}if(c){a.fireEvent("select",a,d)}a.inputEl.focus()}},onExpand:function(){var d=this,a=d.listKeyNav,c=d.selectOnTab,b=d.getPicker();if(a){a.enable()}else{a=d.listKeyNav=new Ext.view.BoundListKeyNav(this.inputEl,{boundList:b,forceKeyDown:true,tab:function(g){if(c){this.selectHighlighted(g);d.triggerBlur()}return true},enter:function(i){var g=b.getSelectionModel(),h=g.getCount();this.selectHighlighted(i);if(!d.multiSelect&&h===g.getCount()){d.collapse()}}})}if(c){d.ignoreMonitorTab=true}Ext.defer(a.enable,1,a);d.inputEl.focus()},onCollapse:function(){var b=this,a=b.listKeyNav;if(a){a.disable();b.ignoreMonitorTab=false}},select:function(e,b){var d=this,c=d.picker,a=true;if(e&&e.isModel&&b===true){if(c){a=!c.getSelectionModel().isSelected(e)}if(a){d.fireEvent("select",d,e)}}d.setValue(e,true)},findRecord:function(d,c){var b=this.store,a=b.findExact(d,c);return a!==-1?b.getAt(a):false},findRecordByValue:function(a){return this.findRecord(this.valueField,a)},findRecordByDisplay:function(a){return this.findRecord(this.displayField,a)},setValue:function(m,e){var k=this,c=k.valueNotFoundText,n=k.inputEl,g,j,h,a,l=[],b=[],d=[];if(k.store.loading){k.value=m;k.setHiddenValue(k.value);return k}m=Ext.Array.from(m);for(g=0,j=m.length;g<j;g++){h=m[g];if(!h||!h.isModel){h=k.findRecordByValue(h)}if(h){l.push(h);b.push(h.data);d.push(h.get(k.valueField))}else{if(!k.forceSelection){d.push(m[g]);a={};a[k.displayField]=m[g];b.push(a)}else{if(Ext.isDefined(c)){b.push(c)}}}}k.setHiddenValue(d);k.value=k.multiSelect?d:d[0];if(!Ext.isDefined(k.value)){k.value=null}k.displayTplData=b;k.lastSelection=k.valueModels=l;if(n&&k.emptyText&&!Ext.isEmpty(m)){n.removeCls(k.emptyCls)}k.setRawValue(k.getDisplayValue());k.checkChange();if(e!==false){k.syncSelection()}k.applyEmptyText();return k},setHiddenValue:function(j){var e=this,a=e.hiddenName,d,b,k,h,g,c;if(!e.hiddenDataEl||!a){return}j=Ext.Array.from(j);b=e.hiddenDataEl.dom;k=b.childNodes;h=k[0];g=j.length;c=k.length;if(!h&&g>0){e.hiddenDataEl.update(Ext.DomHelper.markup({tag:"input",type:"hidden",name:a}));c=1;h=b.firstChild}while(c>g){b.removeChild(k[0]);--c}while(c<g){b.appendChild(h.cloneNode(true));++c}for(d=0;d<g;d++){k[d].value=j[d]}},getDisplayValue:function(){return this.displayTpl.apply(this.displayTplData)},getValue:function(){var b=this,a=b.picker,d=b.getRawValue(),c=b.value;if(b.getDisplayValue()!==d){c=d;b.value=b.displayTplData=b.valueModels=null;if(a){b.ignoreSelection++;a.getSelectionModel().deselectAll();b.ignoreSelection--}}return c},getSubmitValue:function(){var a=this.getValue();if(Ext.isEmpty(a)){a=""}return a},isEqual:function(e,d){var b=Ext.Array.from,c,a;e=b(e);d=b(d);a=e.length;if(a!==d.length){return false}for(c=0;c<a;c++){if(d[c]!==e[c]){return false}}return true},clearValue:function(){this.setValue([])},syncSelection:function(){var h=this,d=h.picker,g,c,b=h.valueModels||[],e=b.length,a,i;if(d){g=[];for(a=0;a<e;a++){i=b[a];if(i&&i.isModel&&h.store.indexOf(i)>=0){g.push(i)}}h.ignoreSelection++;c=d.getSelectionModel();c.deselectAll();if(g.length){c.select(g,undefined,true)}h.ignoreSelection--}},onEditorTab:function(b){var a=this.listKeyNav;if(this.selectOnTab&&a){a.selectHighlighted(b)}}});Ext.define("Ext.picker.Month",{extend:Ext.Component,alias:"widget.monthpicker",alternateClassName:"Ext.MonthPicker",childEls:["bodyEl","prevEl","nextEl","buttonsEl","monthEl","yearEl"],renderTpl:['<div id="{id}-bodyEl" class="{baseCls}-body">','<div id="{id}-monthEl" class="{baseCls}-months">','<tpl for="months">','<div class="{parent.baseCls}-item {parent.baseCls}-month">','<a style="{parent.monthStyle}" hidefocus="on" class="{parent.baseCls}-item-inner" href="#">{.}</a>',"</div>","</tpl>","</div>",'<div id="{id}-yearEl" class="{baseCls}-years">','<div class="{baseCls}-yearnav">','<div class="{baseCls}-yearnav-button-ct">','<a id="{id}-prevEl" class="{baseCls}-yearnav-button {baseCls}-yearnav-prev" href="#" hidefocus="on" ></a>',"</div>",'<div class="{baseCls}-yearnav-button-ct">','<a id="{id}-nextEl" class="{baseCls}-yearnav-button {baseCls}-yearnav-next" href="#" hidefocus="on" ></a>',"</div>","</div>",'<tpl for="years">','<div class="{parent.baseCls}-item {parent.baseCls}-year">','<a hidefocus="on" class="{parent.baseCls}-item-inner" href="#">{.}</a>',"</div>","</tpl>","</div>",'<div class="'+Ext.baseCSSPrefix+'clear"></div>',"</div>",'<tpl if="showButtons">','<div id="{id}-buttonsEl" class="{baseCls}-buttons">{%',"var me=values.$comp, okBtn=me.okBtn, cancelBtn=me.cancelBtn;","okBtn.ownerLayout = cancelBtn.ownerLayout = me.componentLayout;","okBtn.ownerCt = cancelBtn.ownerCt = me;","Ext.DomHelper.generateMarkup(okBtn.getRenderTree(), out);","Ext.DomHelper.generateMarkup(cancelBtn.getRenderTree(), out);","%}</div>","</tpl>"],okText:"OK",cancelText:"Cancel",baseCls:Ext.baseCSSPrefix+"monthpicker",showButtons:true,measureWidth:35,measureMaxHeight:20,smallCls:Ext.baseCSSPrefix+"monthpicker-small",totalYears:10,yearOffset:5,monthOffset:6,initComponent:function(){var a=this;a.selectedCls=a.baseCls+"-selected";a.addEvents("cancelclick","monthclick","monthdblclick","okclick","select","yearclick","yeardblclick");if(a.small){a.addCls(a.smallCls)}a.setValue(a.value);a.activeYear=a.getYear(new Date().getFullYear()-4,-4);if(a.showButtons){a.okBtn=new Ext.button.Button({text:a.okText,handler:a.onOkClick,scope:a});a.cancelBtn=new Ext.button.Button({text:a.cancelText,handler:a.onCancelClick,scope:a})}this.callParent()},beforeRender:function(){var g=this,c=0,b=[],a=Ext.Date.getShortMonthName,e=g.monthOffset,h=g.monthMargin,d="";g.callParent();for(;c<e;++c){b.push(a(c),a(c+e))}if(Ext.isDefined(h)){d="margin: 0 "+h+"px;"}Ext.apply(g.renderData,{months:b,years:g.getYears(),showButtons:g.showButtons,monthStyle:d})},afterRender:function(){var b=this,a=b.bodyEl,c=b.buttonsEl;b.callParent();b.mon(a,"click",b.onBodyClick,b);b.mon(a,"dblclick",b.onBodyClick,b);b.years=a.select("."+b.baseCls+"-year a");b.months=a.select("."+b.baseCls+"-month a");b.backRepeater=new Ext.util.ClickRepeater(b.prevEl,{handler:Ext.Function.bind(b.adjustYear,b,[-b.totalYears])});b.prevEl.addClsOnOver(b.baseCls+"-yearnav-prev-over");b.nextRepeater=new Ext.util.ClickRepeater(b.nextEl,{handler:Ext.Function.bind(b.adjustYear,b,[b.totalYears])});b.nextEl.addClsOnOver(b.baseCls+"-yearnav-next-over");b.updateBody();if(!Ext.isDefined(b.monthMargin)){Ext.picker.Month.prototype.monthMargin=b.calculateMonthMargin()}},calculateMonthMargin:function(){var d=this,b=d.monthEl,a=d.months,e=a.first(),c=e.getMargin("l");while(c&&d.getLargest()>d.measureMaxHeight){--c;a.setStyle("margin","0 "+c+"px")}return c},getLargest:function(a){var b=0;this.months.each(function(d){var c=d.getHeight();if(c>b){b=c}});return b},setValue:function(d){var c=this,e=c.activeYear,g=c.monthOffset,b,a;if(!d){c.value=[null,null]}else{if(Ext.isDate(d)){c.value=[d.getMonth(),d.getFullYear()]}else{c.value=[d[0],d[1]]}}if(c.rendered){b=c.value[1];if(b!==null){if((b<e||b>e+c.yearOffset)){c.activeYear=b-c.yearOffset+1}}c.updateBody()}return c},getValue:function(){return this.value},hasSelection:function(){var a=this.value;return a[0]!==null&&a[1]!==null},getYears:function(){var d=this,e=d.yearOffset,g=d.activeYear,a=g+e,c=g,b=[];for(;c<a;++c){b.push(c,c+e)}return b},updateBody:function(){var i=this,e=i.years,b=i.months,m=i.getYears(),n=i.selectedCls,k=i.getYear(null),g=i.value[0],l=i.monthOffset,h,d,j,a,c;if(i.rendered){e.removeCls(n);b.removeCls(n);d=e.elements;a=d.length;for(j=0;j<a;j++){c=Ext.fly(d[j]);h=m[j];c.dom.innerHTML=h;if(h==k){c.addCls(n)}}if(g!==null){if(g<l){g=g*2}else{g=(g-l)*2+1}b.item(g).addCls(n)}}},getYear:function(a,c){var b=this.value[1];c=c||0;return b===null?a:b+c},onBodyClick:function(d,b){var c=this,a=d.type=="dblclick";if(d.getTarget("."+c.baseCls+"-month")){d.stopEvent();c.onMonthClick(b,a)}else{if(d.getTarget("."+c.baseCls+"-year")){d.stopEvent();c.onYearClick(b,a)}}},adjustYear:function(a){if(typeof a!="number"){a=this.totalYears}this.activeYear+=a;this.updateBody()},onOkClick:function(){this.fireEvent("okclick",this,this.value)},onCancelClick:function(){this.fireEvent("cancelclick",this)},onMonthClick:function(c,a){var b=this;b.value[0]=b.resolveOffset(b.months.indexOf(c),b.monthOffset);b.updateBody();b.fireEvent("month"+(a?"dbl":"")+"click",b,b.value);b.fireEvent("select",b,b.value)},onYearClick:function(c,a){var b=this;b.value[1]=b.activeYear+b.resolveOffset(b.years.indexOf(c),b.yearOffset);b.updateBody();b.fireEvent("year"+(a?"dbl":"")+"click",b,b.value);b.fireEvent("select",b,b.value)},resolveOffset:function(a,b){if(a%2===0){return(a/2)}else{return b+Math.floor(a/2)}},beforeDestroy:function(){var a=this;a.years=a.months=null;Ext.destroyMembers(a,"backRepeater","nextRepeater","okBtn","cancelBtn");a.callParent()},finishRenderChildren:function(){var a=this;this.callParent(arguments);if(this.showButtons){a.okBtn.finishRender();a.cancelBtn.finishRender()}},onDestroy:function(){Ext.destroyMembers(this,"okBtn","cancelBtn");this.callParent()}});Ext.define("Ext.picker.Date",{extend:Ext.Component,alias:"widget.datepicker",alternateClassName:"Ext.DatePicker",childEls:["innerEl","eventEl","prevEl","nextEl","middleBtnEl","footerEl"],border:true,renderTpl:['<div id="{id}-innerEl" role="grid">','<div role="presentation" class="{baseCls}-header">','<a id="{id}-prevEl" class="{baseCls}-prev {baseCls}-arrow" href="#" role="button" title="{prevText}" hidefocus="on" ></a>','<div class="{baseCls}-month" id="{id}-middleBtnEl">{%this.renderMonthBtn(values, out)%}</div>','<a id="{id}-nextEl" class="{baseCls}-next {baseCls}-arrow" href="#" role="button" title="{nextText}" hidefocus="on" ></a>',"</div>",'<table id="{id}-eventEl" class="{baseCls}-inner" cellspacing="0" role="presentation">','<thead role="presentation"><tr role="presentation">','<tpl for="dayNames">','<th role="columnheader" class="{parent.baseCls}-column-header" title="{.}">','<div class="{parent.baseCls}-column-header-inner">{.:this.firstInitial}</div>',"</th>","</tpl>","</tr></thead>",'<tbody role="presentation"><tr role="presentation">','<tpl for="days">',"{#:this.isEndOfWeek}",'<td role="gridcell" id="{[Ext.id()]}">','<a role="presentation" hidefocus="on" class="{parent.baseCls}-date" href="#"></a>',"</td>","</tpl>","</tr></tbody>","</table>",'<tpl if="showToday">','<div id="{id}-footerEl" role="presentation" class="{baseCls}-footer">{%this.renderTodayBtn(values, out)%}</div>',"</tpl>","</div>",{firstInitial:function(a){return Ext.picker.Date.prototype.getDayInitial(a)},isEndOfWeek:function(b){b--;var a=b%7===0&&b!==0;return a?'</tr><tr role="row">':""},renderTodayBtn:function(a,b){Ext.DomHelper.generateMarkup(a.$comp.todayBtn.getRenderTree(),b)},renderMonthBtn:function(a,b){Ext.DomHelper.generateMarkup(a.$comp.monthBtn.getRenderTree(),b)}}],todayText:"Today",ariaTitle:"Date Picker: {0}",ariaTitleDateFormat:"F d, Y",todayTip:"{0} (Spacebar)",minText:"This date is before the minimum date",maxText:"This date is after the maximum date",disabledDaysText:"Disabled",disabledDatesText:"Disabled",nextText:"Next Month (Control+Right)",prevText:"Previous Month (Control+Left)",monthYearText:"Choose a month (Control+Up/Down to move years)",monthYearFormat:"F Y",startDay:0,showToday:true,disableAnim:false,baseCls:Ext.baseCSSPrefix+"datepicker",longDayFormat:"F d, Y",focusOnShow:false,focusOnSelect:true,initHour:12,numDays:42,initComponent:function(){var b=this,a=Ext.Date.clearTime;b.selectedCls=b.baseCls+"-selected";b.disabledCellCls=b.baseCls+"-disabled";b.prevCls=b.baseCls+"-prevday";b.activeCls=b.baseCls+"-active";b.cellCls=b.baseCls+"-cell";b.nextCls=b.baseCls+"-prevday";b.todayCls=b.baseCls+"-today";b.dayNames=b.dayNames.slice(b.startDay).concat(b.dayNames.slice(0,b.startDay));b.callParent();b.value=b.value?a(b.value,true):a(new Date());b.addEvents("select");b.initDisabledDays()},beforeRender:function(){var b=this,c=new Array(b.numDays),a=Ext.Date.format(new Date(),b.format);if(b.up("menu")){b.addCls(Ext.baseCSSPrefix+"menu")}b.monthBtn=new Ext.button.Split({ownerCt:b,ownerLayout:b.getComponentLayout(),text:"",tooltip:b.monthYearText,listeners:{click:b.showMonthPicker,arrowclick:b.showMonthPicker,scope:b}});if(b.showToday){b.todayBtn=new Ext.button.Button({ownerCt:b,ownerLayout:b.getComponentLayout(),text:Ext.String.format(b.todayText,a),tooltip:Ext.String.format(b.todayTip,a),tooltipType:"title",handler:b.selectToday,scope:b})}b.callParent();Ext.applyIf(b,{renderData:{}});Ext.apply(b.renderData,{dayNames:b.dayNames,showToday:b.showToday,prevText:b.prevText,nextText:b.nextText,days:c});b.protoEl.unselectable()},finishRenderChildren:function(){var a=this;a.callParent();a.monthBtn.finishRender();if(a.showToday){a.todayBtn.finishRender()}},onRender:function(b,a){var c=this;c.callParent(arguments);c.cells=c.eventEl.select("tbody td");c.textNodes=c.eventEl.query("tbody td a");c.mon(c.eventEl,{scope:c,mousewheel:c.handleMouseWheel,click:{fn:c.handleDateClick,delegate:"a."+c.baseCls+"-date"}})},initEvents:function(){var c=this,a=Ext.Date,b=a.DAY;c.callParent();c.prevRepeater=new Ext.util.ClickRepeater(c.prevEl,{handler:c.showPrevMonth,scope:c,preventDefault:true,stopDefault:true});c.nextRepeater=new Ext.util.ClickRepeater(c.nextEl,{handler:c.showNextMonth,scope:c,preventDefault:true,stopDefault:true});c.keyNav=new Ext.util.KeyNav(c.eventEl,Ext.apply({scope:c,left:function(d){if(d.ctrlKey){c.showPrevMonth()}else{c.update(a.add(c.activeDate,b,-1))}},right:function(d){if(d.ctrlKey){c.showNextMonth()}else{c.update(a.add(c.activeDate,b,1))}},up:function(d){if(d.ctrlKey){c.showNextYear()}else{c.update(a.add(c.activeDate,b,-7))}},down:function(d){if(d.ctrlKey){c.showPrevYear()}else{c.update(a.add(c.activeDate,b,7))}},pageUp:c.showNextMonth,pageDown:c.showPrevMonth,enter:function(d){d.stopPropagation();return true}},c.keyNavConfig));if(c.showToday){c.todayKeyListener=c.eventEl.addKeyListener(Ext.EventObject.SPACE,c.selectToday,c)}c.update(c.value)},initDisabledDays:function(){var h=this,b=h.disabledDates,g="(?:",a,i,c,e;if(!h.disabledDatesRE&&b){a=b.length-1;c=b.length;for(i=0;i<c;i++){e=b[i];g+=Ext.isDate(e)?"^"+Ext.String.escapeRegex(Ext.Date.dateFormat(e,h.format))+"$":e;if(i!=a){g+="|"}}h.disabledDatesRE=new RegExp(g+")")}},setDisabledDates:function(a){var b=this;if(Ext.isArray(a)){b.disabledDates=a;b.disabledDatesRE=null}else{b.disabledDatesRE=a}b.initDisabledDays();b.update(b.value,true);return b},setDisabledDays:function(a){this.disabledDays=a;return this.update(this.value,true)},setMinDate:function(a){this.minDate=a;return this.update(this.value,true)},setMaxDate:function(a){this.maxDate=a;return this.update(this.value,true)},setValue:function(a){this.value=Ext.Date.clearTime(a,true);return this.update(this.value)},getValue:function(){return this.value},getDayInitial:function(a){return a.substr(0,1)},focus:function(){this.update(this.activeDate)},onEnable:function(){this.callParent();this.setDisabledStatus(false);this.update(this.activeDate)},onDisable:function(){this.callParent();this.setDisabledStatus(true)},setDisabledStatus:function(a){var b=this;b.keyNav.setDisabled(a);b.prevRepeater.setDisabled(a);b.nextRepeater.setDisabled(a);if(b.showToday){b.todayKeyListener.setDisabled(a);b.todayBtn.setDisabled(a)}},getActive:function(){return this.activeDate||this.value},runAnimation:function(c){var b=this.monthPicker,a={duration:200,callback:function(){if(c){b.hide()}else{b.show()}}};if(c){b.el.slideOut("t",a)}else{b.el.slideIn("t",a)}},hideMonthPicker:function(a){var c=this,b=c.monthPicker;if(b){if(c.shouldAnimate(a)){c.runAnimation(true)}else{b.hide()}}return c},showMonthPicker:function(a){var c=this,b;if(c.rendered&&!c.disabled){b=c.createMonthPicker();b.setValue(c.getActive());b.setSize(c.getSize());b.setPosition(-1,-1);if(c.shouldAnimate(a)){c.runAnimation(false)}else{b.show()}}return c},shouldAnimate:function(a){return Ext.isDefined(a)?a:!this.disableAnim},createMonthPicker:function(){var b=this,a=b.monthPicker;if(!a){b.monthPicker=a=new Ext.picker.Month({renderTo:b.el,floating:true,shadow:false,small:b.showToday===false,listeners:{scope:b,cancelclick:b.onCancelClick,okclick:b.onOkClick,yeardblclick:b.onOkClick,monthdblclick:b.onOkClick}});if(!b.disableAnim){a.el.setStyle("display","none")}b.on("beforehide",Ext.Function.bind(b.hideMonthPicker,b,[false]))}return a},onOkClick:function(b,e){var d=this,g=e[0],c=e[1],a=new Date(c,g,d.getActive().getDate());if(a.getMonth()!==g){a=Ext.Date.getLastDateOfMonth(new Date(c,g,1))}d.setValue(a);d.hideMonthPicker()},onCancelClick:function(){this.selectedUpdate(this.activeDate);this.hideMonthPicker()},showPrevMonth:function(a){return this.setValue(Ext.Date.add(this.activeDate,Ext.Date.MONTH,-1))},showNextMonth:function(a){return this.setValue(Ext.Date.add(this.activeDate,Ext.Date.MONTH,1))},showPrevYear:function(){return this.setValue(Ext.Date.add(this.activeDate,Ext.Date.YEAR,-1))},showNextYear:function(){return this.setValue(Ext.Date.add(this.activeDate,Ext.Date.YEAR,1))},handleMouseWheel:function(a){a.stopEvent();if(!this.disabled){var b=a.getWheelDelta();if(b>0){this.showPrevMonth()}else{if(b<0){this.showNextMonth()}}}},handleDateClick:function(d,a){var c=this,b=c.handler;d.stopEvent();if(!c.disabled&&a.dateValue&&!Ext.fly(a.parentNode).hasCls(c.disabledCellCls)){c.doCancelFocus=c.focusOnSelect===false;c.setValue(new Date(a.dateValue));delete c.doCancelFocus;c.fireEvent("select",c,c.value);if(b){b.call(c.scope||c,c,c.value)}c.onSelect()}},onSelect:function(){if(this.hideOnSelect){this.hide()}},selectToday:function(){var c=this,a=c.todayBtn,b=c.handler;if(a&&!a.disabled){c.setValue(Ext.Date.clearTime(new Date()));c.fireEvent("select",c,c.value);if(b){b.call(c.scope||c,c,c.value)}c.onSelect()}return c},selectedUpdate:function(a){var d=this,i=a.getTime(),j=d.cells,k=d.selectedCls,g=j.elements,b,e=g.length,h;j.removeCls(k);for(b=0;b<e;b++){h=Ext.fly(g[b]);if(h.dom.firstChild.dateValue==i){d.fireEvent("highlightitem",d,h);h.addCls(k);if(d.isVisible()&&!d.doCancelFocus){Ext.fly(h.dom.firstChild).focus(50)}break}}},fullUpdate:function(B){var F=this,g=F.cells.elements,d=F.textNodes,H=F.disabledCellCls,o=Ext.Date,x=0,E=0,e=F.isVisible(),v=+o.clearTime(B,true),A=+o.clearTime(new Date()),u=F.minDate?o.clearTime(F.minDate,true):Number.NEGATIVE_INFINITY,w=F.maxDate?o.clearTime(F.maxDate,true):Number.POSITIVE_INFINITY,D=F.disabledDatesRE,t=F.disabledDatesText,I=F.disabledDays?F.disabledDays.join(""):false,C=F.disabledDaysText,y=F.format,m=o.getDaysInMonth(B),q=o.getFirstDateOfMonth(B),j=q.getDay()-F.startDay,z=o.add(B,o.MONTH,-1),b=F.longDayFormat,h,l,r,a,G,n,p,c,k,s;if(j<0){j+=7}m+=j;l=o.getDaysInMonth(z)-j;r=new Date(z.getFullYear(),z.getMonth(),l,F.initHour);if(F.showToday){G=o.clearTime(new Date());a=(G<u||G>w||(D&&y&&D.test(o.dateFormat(G,y)))||(I&&I.indexOf(G.getDay())!=-1));if(!F.disabled){F.todayBtn.setDisabled(a);F.todayKeyListener.setDisabled(a)}}n=function(i,J){h=false;s=+o.clearTime(r,true);i.title=o.format(r,b);i.firstChild.dateValue=s;if(s==A){J+=" "+F.todayCls;i.title=F.todayText}if(s==v){J+=" "+F.selectedCls;F.fireEvent("highlightitem",F,i);if(e&&F.floating){Ext.fly(i.firstChild).focus(50)}}if(s<u){J+=" "+H;i.title=F.minText;h=true}if(!h&&s>w){J+=" "+H;i.title=F.maxText;h=true}if(!h&&I){if(I.indexOf(r.getDay())!==-1){i.title=C;J+=" "+H;h=true}}if(!h&&D&&y){k=o.dateFormat(r,y);if(D.test(k)){i.title=t.replace("%0",k);J+=" "+H}}i.className=J+" "+F.cellCls};for(;x<F.numDays;++x){if(x<j){p=(++l);c=F.prevCls}else{if(x>=m){p=(++E);c=F.nextCls}else{p=x-j+1;c=F.activeCls}}d[x].innerHTML=p;r.setDate(r.getDate()+1);n(g[x],c)}F.monthBtn.setText(Ext.Date.format(B,F.monthYearFormat))},update:function(a,d){var b=this,c=b.activeDate;if(b.rendered){b.activeDate=a;if(!d&&c&&b.el&&c.getMonth()==a.getMonth()&&c.getFullYear()==a.getFullYear()){b.selectedUpdate(a,c)}else{b.fullUpdate(a,c)}b.innerEl.dom.title=Ext.String.format(b.ariaTitle,Ext.Date.format(b.activeDate,b.ariaTitleDateFormat))}return b},beforeDestroy:function(){var a=this;if(a.rendered){Ext.destroy(a.todayKeyListener,a.keyNav,a.monthPicker,a.monthBtn,a.nextRepeater,a.prevRepeater,a.todayBtn);delete a.textNodes;delete a.cells.elements}a.callParent()},onShow:function(){this.callParent(arguments);if(this.focusOnShow){this.focus()}}},function(){var b=this.prototype,a=Ext.Date;b.monthNames=a.monthNames;b.dayNames=a.dayNames;b.format=a.defaultFormat});Ext.define("Ext.form.field.Date",{extend:Ext.form.field.Picker,alias:"widget.datefield",alternateClassName:["Ext.form.DateField","Ext.form.Date"],format:"m/d/Y",altFormats:"m/d/Y|n/j/Y|n/j/y|m/j/y|n/d/y|m/j/Y|n/d/Y|m-d-y|m-d-Y|m/d|m-d|md|mdy|mdY|d|Y-m-d|n-j|n/j",disabledDaysText:"Disabled",disabledDatesText:"Disabled",minText:"The date in this field must be equal to or after {0}",maxText:"The date in this field must be equal to or before {0}",invalidText:"{0} is not a valid date - it must be in the format {1}",triggerCls:Ext.baseCSSPrefix+"form-date-trigger",showToday:true,useStrict:undefined,initTime:"12",initTimeFormat:"H",matchFieldWidth:false,startDay:0,initComponent:function(){var d=this,b=Ext.isString,c,a;c=d.minValue;a=d.maxValue;if(b(c)){d.minValue=d.parseDate(c)}if(b(a)){d.maxValue=d.parseDate(a)}d.disabledDatesRE=null;d.initDisabledDays();d.callParent()},initValue:function(){var a=this,b=a.value;if(Ext.isString(b)){a.value=a.rawToValue(b)}a.callParent()},initDisabledDays:function(){if(this.disabledDates){var b=this.disabledDates,a=b.length-1,g="(?:",h,e=b.length,c;for(h=0;h<e;h++){c=b[h];g+=Ext.isDate(c)?"^"+Ext.String.escapeRegex(c.dateFormat(this.format))+"$":c;if(h!==a){g+="|"}}this.disabledDatesRE=new RegExp(g+")")}},setDisabledDates:function(a){var c=this,b=c.picker;c.disabledDates=a;c.initDisabledDays();if(b){b.setDisabledDates(c.disabledDatesRE)}},setDisabledDays:function(a){var b=this.picker;this.disabledDays=a;if(b){b.setDisabledDays(a)}},setMinValue:function(c){var b=this,a=b.picker,d=(Ext.isString(c)?b.parseDate(c):c);b.minValue=d;if(a){a.minText=Ext.String.format(b.minText,b.formatDate(b.minValue));a.setMinDate(d)}},setMaxValue:function(c){var b=this,a=b.picker,d=(Ext.isString(c)?b.parseDate(c):c);b.maxValue=d;if(a){a.maxText=Ext.String.format(b.maxText,b.formatDate(b.maxValue));a.setMaxDate(d)}},getErrors:function(q){var j=this,p=Ext.String.format,k=Ext.Date.clearTime,o=j.callParent(arguments),n=j.disabledDays,d=j.disabledDatesRE,m=j.minValue,h=j.maxValue,g=n?n.length:0,e=0,a,b,l,c;q=j.formatDate(q||j.processRawValue(j.getRawValue()));if(q===null||q.length<1){return o}a=q;q=j.parseDate(q);if(!q){o.push(p(j.invalidText,a,Ext.Date.unescapeFormat(j.format)));return o}c=q.getTime();if(m&&c<k(m).getTime()){o.push(p(j.minText,j.formatDate(m)))}if(h&&c>k(h).getTime()){o.push(p(j.maxText,j.formatDate(h)))}if(n){l=q.getDay();for(;e<g;e++){if(l===n[e]){o.push(j.disabledDaysText);break}}}b=j.formatDate(q);if(d&&d.test(b)){o.push(p(j.disabledDatesText,b))}return o},rawToValue:function(a){return this.parseDate(a)||a||null},valueToRaw:function(a){return this.formatDate(this.parseDate(a))},safeParse:function(g,h){var e=this,c=Ext.Date,a=null,b=e.useStrict,d;if(c.formatContainsHourInfo(h)){a=c.parse(g,h,b)}else{d=c.parse(g+" "+e.initTime,h+" "+e.initTimeFormat,b);if(d){a=c.clearTime(d)}}return a},getSubmitValue:function(){var b=this.submitFormat||this.format,a=this.getValue();return a?Ext.Date.format(a,b):""},parseDate:function(e){if(!e||Ext.isDate(e)){return e}var d=this,h=d.safeParse(e,d.format),b=d.altFormats,g=d.altFormatsArray,c=0,a;if(!h&&b){g=g||b.split("|");a=g.length;for(;c<a&&!h;++c){h=d.safeParse(e,g[c])}}return h},formatDate:function(a){return Ext.isDate(a)?Ext.Date.dateFormat(a,this.format):a},createPicker:function(){var a=this,b=Ext.String.format;return new Ext.picker.Date({pickerField:a,ownerCt:a.ownerCt,renderTo:document.body,floating:true,hidden:true,focusOnShow:true,minDate:a.minValue,maxDate:a.maxValue,disabledDatesRE:a.disabledDatesRE,disabledDatesText:a.disabledDatesText,disabledDays:a.disabledDays,disabledDaysText:a.disabledDaysText,format:a.format,showToday:a.showToday,startDay:a.startDay,minText:b(a.minText,a.formatDate(a.minValue)),maxText:b(a.maxText,a.formatDate(a.maxValue)),listeners:{scope:a,select:a.onSelect},keyNavConfig:{esc:function(){a.collapse()}}})},onDownArrow:function(a){this.callParent(arguments);if(this.isExpanded){this.getPicker().focus()}},onSelect:function(a,c){var b=this;b.setValue(c);b.fireEvent("select",b,c);b.collapse()},onExpand:function(){var a=this.getValue();this.picker.setValue(Ext.isDate(a)?a:new Date())},onCollapse:function(){this.focus(false,60)},beforeBlur:function(){var c=this,a=c.parseDate(c.getRawValue()),b=c.focusTask;if(b){b.cancel()}if(a){c.setValue(a)}}});Ext.define("Ext.form.field.FileButton",{extend:Ext.button.Button,alias:"widget.filebutton",childEls:["btnEl","btnWrap","btnInnerEl","btnIconEl","fileInputEl"],inputCls:Ext.baseCSSPrefix+"form-file-input",cls:Ext.baseCSSPrefix+"form-file-btn",preventDefault:false,renderTpl:['<div id="{id}-btnWrap" class="{baseCls}-wrap','<tpl if="splitCls"> {splitCls}</tpl>','{childElCls}" unselectable="on">','<a id="{id}-btnEl" class="{baseCls}-button" role="button" hidefocus="on" unselectable="on"','<tpl if="tabIndex != null>',' tabIndex="{tabIndex}"',"</tpl>",">",'<span id="{id}-btnInnerEl" class="{baseCls}-inner {innerCls}','{childElCls}" unselectable="on">',"{text}","</span>",'<span role="img" id="{id}-btnIconEl" class="{baseCls}-icon-el {iconCls}','{childElCls} {glyphCls}" unselectable="on" style="','<tpl if="iconUrl">background-image:url({iconUrl});</tpl>','<tpl if="glyph && glyphFontFamily">font-family:{glyphFontFamily};</tpl>">','<tpl if="glyph">&#{glyph};</tpl><tpl if="iconCls || iconUrl">&#160;</tpl>',"</span>","</a>","</div>",'<input id="{id}-fileInputEl" class="{inputCls}" type="file" size="1" name="{inputName}">'],getTemplateArgs:function(){var a=this.callParent();a.inputCls=this.inputCls;a.inputName=this.inputName;return a},afterRender:function(){var a=this;a.callParent(arguments);a.fileInputEl.on("change",a.fireChange,a)},fireChange:function(a){this.fireEvent("change",this,a,this.fileInputEl.dom.value)},createFileInput:function(a){var b=this;b.fileInputEl=b.el.createChild({name:b.inputName,id:!a?b.id+"-fileInputEl":undefined,cls:b.inputCls,tag:"input",type:"file",size:1});b.fileInputEl.on("change",b.fireChange,b)},reset:function(a){if(a){this.fileInputEl.remove()}this.createFileInput(!a)},restoreInput:function(a){this.fileInputEl.remove();a=Ext.get(a);this.el.appendChild(a);this.fileInputEl=a},onDisable:function(){this.callParent();this.fileInputEl.dom.disabled=true},onEnable:function(){this.callParent();this.fileInputEl.dom.disabled=false}});Ext.define("Ext.form.field.File",{extend:Ext.form.field.Trigger,alias:["widget.filefield","widget.fileuploadfield"],alternateClassName:["Ext.form.FileUploadField","Ext.ux.form.FileUploadField","Ext.form.File"],buttonText:"Browse...",buttonOnly:false,buttonMargin:3,clearOnSubmit:true,fieldBodyCls:Ext.baseCSSPrefix+"form-file-wrap",readOnly:true,triggerNoEditCls:"",componentLayout:"triggerfield",childEls:["browseButtonWrap"],onRender:function(){var a=this,c=a.id,b;a.callParent(arguments);b=a.inputEl;b.dom.name="";a.button=new Ext.form.field.FileButton(Ext.apply({renderTo:c+"-browseButtonWrap",ownerCt:a,ownerLayout:a.componentLayout,id:c+"-button",ui:a.ui,disabled:a.disabled,text:a.buttonText,style:a.buttonOnly?"":"margin-left:"+a.buttonMargin+"px",inputName:a.getName(),listeners:{scope:a,change:a.onFileChange}},a.buttonConfig));a.fileInputEl=a.button.fileInputEl;if(a.buttonOnly){a.inputCell.setDisplayed(false)}a.browseButtonWrap.dom.style.width=(a.browseButtonWrap.dom.lastChild.offsetWidth+a.button.getEl().getMargin("lr"))+"px";if(Ext.isIE){a.button.getEl().repaint()}},getTriggerMarkup:function(){return'<td id="'+this.id+'-browseButtonWrap"></td>'},onFileChange:function(a,c,b){this.lastValue=null;Ext.form.field.File.superclass.setValue.call(this,b)},setValue:Ext.emptyFn,reset:function(){var b=this,a=b.clearOnSubmit;if(b.rendered){b.button.reset(a);b.fileInputEl=b.button.fileInputEl;if(a){b.inputEl.dom.value=""}}b.callParent()},onShow:function(){this.callParent();this.button.updateLayout()},onDisable:function(){this.callParent();this.button.disable()},onEnable:function(){this.callParent();this.button.enable()},isFileUpload:function(){return true},extractFileInput:function(){var a=this.button.fileInputEl.dom;this.reset();return a},restoreInput:function(b){var a=this.button;a.restoreInput(b);this.fileInputEl=a.fileInputEl},onDestroy:function(){Ext.destroyMembers(this,"button");delete this.fileInputEl;this.callParent()}});Ext.define("Ext.form.field.Hidden",{extend:Ext.form.field.Base,alias:["widget.hiddenfield","widget.hidden"],alternateClassName:"Ext.form.Hidden",inputType:"hidden",hideLabel:true,initComponent:function(){this.formItemCls+="-hidden";this.callParent()},isEqual:function(b,a){return this.isEqualAsString(b,a)},initEvents:Ext.emptyFn,setSize:Ext.emptyFn,setWidth:Ext.emptyFn,setHeight:Ext.emptyFn,setPosition:Ext.emptyFn,setPagePosition:Ext.emptyFn,markInvalid:Ext.emptyFn,clearInvalid:Ext.emptyFn});Ext.define("Ext.picker.Color",{extend:Ext.Component,alias:"widget.colorpicker",alternateClassName:"Ext.ColorPalette",componentCls:Ext.baseCSSPrefix+"color-picker",selectedCls:Ext.baseCSSPrefix+"color-picker-selected",itemCls:Ext.baseCSSPrefix+"color-picker-item",value:null,clickEvent:"click",allowReselect:false,colors:["000000","993300","333300","003300","003366","000080","333399","333333","800000","FF6600","808000","008000","008080","0000FF","666699","808080","FF0000","FF9900","99CC00","339966","33CCCC","3366FF","800080","969696","FF00FF","FFCC00","FFFF00","00FF00","00FFFF","00CCFF","993366","C0C0C0","FF99CC","FFCC99","FFFF99","CCFFCC","CCFFFF","99CCFF","CC99FF","FFFFFF"],colorRe:/(?:^|\s)color-(.{6})(?:\s|$)/,renderTpl:['<tpl for="colors">','<a href="#" class="color-{.} {parent.itemCls}" hidefocus="on">','<span class="{parent.itemCls}-inner" style="background:#{.}">&#160;</span>',"</a>","</tpl>"],initComponent:function(){var a=this;a.callParent(arguments);a.addEvents("select");if(a.handler){a.on("select",a.handler,a.scope,true)}},initRenderData:function(){var a=this;return Ext.apply(a.callParent(),{itemCls:a.itemCls,colors:a.colors})},onRender:function(){var b=this,a=b.clickEvent;b.callParent(arguments);b.mon(b.el,a,b.handleClick,b,{delegate:"a"});if(a!="click"){b.mon(b.el,"click",Ext.emptyFn,b,{delegate:"a",stopEvent:true})}},afterRender:function(){var a=this,b;a.callParent(arguments);if(a.value){b=a.value;a.value=null;a.select(b,true)}},handleClick:function(c,d){var b=this,a;c.stopEvent();if(!b.disabled){a=d.className.match(b.colorRe)[1];b.select(a.toUpperCase())}},select:function(b,a){var d=this,g=d.selectedCls,e=d.value,c;b=b.replace("#","");if(!d.rendered){d.value=b;return}if(b!=e||d.allowReselect){c=d.el;if(d.value){c.down("a.color-"+e).removeCls(g)}c.down("a.color-"+b).addCls(g);d.value=b;if(a!==true){d.fireEvent("select",d,b)}}},getValue:function(){return this.value||null}});Ext.define("Ext.layout.component.field.HtmlEditor",{extend:Ext.layout.component.field.FieldContainer,alias:["layout.htmleditor"],type:"htmleditor",naturalHeight:150,naturalWidth:300,beginLayout:function(b){var a=this.owner;this.callParent(arguments);b.toolbarContext=b.context.getCmp(a.toolbar);b.inputCmpContext=b.context.getCmp(a.inputCmp);b.textAreaContext=b.getEl("textareaEl");b.iframeContext=b.getEl("iframeEl")},beginLayoutCycle:function(h){var g=this,c=h.widthModel,b=h.heightModel,a=g.owner,e=a.iframeEl,d=a.textareaEl;g.callParent(arguments);if(c.shrinkWrap){e.setStyle("width","");d.setStyle("width","")}else{if(c.natural){h.bodyCellContext.setWidth(g.naturalWidth)}}if(b.natural||b.shrinkWrap){e.setHeight(g.naturalHeight);d.setHeight(g.naturalHeight)}},finishedLayout:function(){this.callParent(arguments);if(Ext.isIE9m&&Ext.isIEQuirks){this.owner.el.repaint()}},publishOwnerWidth:function(b,a){this.callParent(arguments);a-=b.inputCmpContext.getBorderInfo().width;b.textAreaContext.setWidth(a);b.iframeContext.setWidth(a)},publishInnerWidth:function(e,c){var b=e.inputCmpContext.getBorderInfo().width,d=Ext.isStrict&&Ext.isIE8m,a=e.widthModel.natural;this.callParent(arguments);c=e.bodyCellContext.props.width-b;if(a){if(d){c-=2}e.textAreaContext.setWidth(c);e.iframeContext.setWidth(c)}else{if(d){e.textAreaContext.setWidth(c)}}},publishInnerHeight:function(c,a){var d=c.toolbarContext.getProp("height"),b=this.owner.sourceEditMode;this.callParent(arguments);a=c.bodyCellContext.props.height;if(d!==undefined){a-=d+c.inputCmpContext.getFrameInfo().height;if(Ext.isIE8&&Ext.isStrict){a-=2}else{if(Ext.isIEQuirks&&(Ext.isIE8||Ext.isIE9)){a-=4}}c.iframeContext.setHeight(a);c.textAreaContext.setHeight(a)}else{this.done=false}}});Ext.define("Ext.form.field.HtmlEditor",{extend:Ext.form.FieldContainer,mixins:{field:Ext.form.field.Field},alias:"widget.htmleditor",alternateClassName:"Ext.form.HtmlEditor",componentLayout:"htmleditor",componentTpl:["{beforeTextAreaTpl}",'<textarea id="{id}-textareaEl" name="{name}" tabIndex="-1" {inputAttrTpl}',' class="{textareaCls}" autocomplete="off">',"{[Ext.util.Format.htmlEncode(values.value)]}","</textarea>","{afterTextAreaTpl}","{beforeIFrameTpl}",'<iframe id="{id}-iframeEl" name="{iframeName}" frameBorder="0" {iframeAttrTpl}',' src="{iframeSrc}" class="{iframeCls}"></iframe>',"{afterIFrameTpl}",{disableFormats:true}],stretchInputElFixed:true,subTplInsertions:["beforeTextAreaTpl","afterTextAreaTpl","beforeIFrameTpl","afterIFrameTpl","iframeAttrTpl","inputAttrTpl"],enableFormat:true,enableFontSize:true,enableColors:true,enableAlignments:true,enableLists:true,enableSourceEdit:true,enableLinks:true,enableFont:true,createLinkText:"Please enter the URL for the link:",defaultLinkValue:"http://",fontFamilies:["Arial","Courier New","Tahoma","Times New Roman","Verdana"],defaultValue:(Ext.isOpera||Ext.isIE6)?"&#160;":"&#8203;",fieldBodyCls:Ext.baseCSSPrefix+"html-editor-wrap",initialized:false,activated:false,sourceEditMode:false,iframePad:3,hideMode:"offsets",maskOnDisable:true,containerElCls:Ext.baseCSSPrefix+"html-editor-container",initComponent:function(){var a=this;a.addEvents("initialize","activate","beforesync","beforepush","sync","push","editmodechange");a.items=[a.createToolbar(),a.createInputCmp()];a.layout={type:"vbox",align:"stretch"};a.callParent(arguments);a.initField()},createInputCmp:function(){this.inputCmp=Ext.widget(this.getInputCmpCfg());return this.inputCmp},getInputCmpCfg:function(){var a=this,c=a.id+"-inputCmp",b={id:c,name:a.name,textareaCls:Ext.baseCSSPrefix+"hidden",value:a.value,iframeName:Ext.id(),iframeSrc:Ext.SSL_SECURE_URL,iframeCls:Ext.baseCSSPrefix+"htmleditor-iframe"};a.getInsertionRenderData(b,a.subTplInsertions);return{flex:1,xtype:"component",tpl:a.getTpl("componentTpl"),childEls:["iframeEl","textareaEl"],id:c,cls:Ext.baseCSSPrefix+"html-editor-input",data:b}},createToolbar:function(){this.toolbar=Ext.widget(this.getToolbarCfg());return this.toolbar},getToolbarCfg:function(){var h=this,b=[],e,a=Ext.quickTipsActive&&Ext.tip.QuickTipManager.isEnabled(),d=Ext.baseCSSPrefix,j,g;function c(l,i,k){return{itemId:l,cls:d+"btn-icon",iconCls:d+"edit-"+l,enableToggle:i!==false,scope:h,handler:k||h.relayBtnCmd,clickEvent:"mousedown",tooltip:a?h.buttonTips[l]||g:g,overflowText:h.buttonTips[l].title||g,tabIndex:-1}}if(h.enableFont&&!Ext.isSafari2){j=Ext.widget("component",{itemId:"fontSelect",renderTpl:['<select id="{id}-selectEl" class="'+d+'font-select">',"</select>"],childEls:["selectEl"],afterRender:function(){h.fontSelect=this.selectEl;Ext.Component.prototype.afterRender.apply(this,arguments)},onDisable:function(){var i=this.selectEl;if(i){i.dom.disabled=true}Ext.Component.prototype.onDisable.apply(this,arguments)},onEnable:function(){var i=this.selectEl;if(i){i.dom.disabled=false}Ext.Component.prototype.onEnable.apply(this,arguments)},listeners:{change:function(){h.win.focus();h.relayCmd("fontName",h.fontSelect.dom.value);h.deferFocus()},element:"selectEl"}});b.push(j,"-")}if(h.enableFormat){b.push(c("bold"),c("italic"),c("underline"))}if(h.enableFontSize){b.push("-",c("increasefontsize",false,h.adjustFont),c("decreasefontsize",false,h.adjustFont))}if(h.enableColors){b.push("-",{itemId:"forecolor",cls:d+"btn-icon",iconCls:d+"edit-forecolor",overflowText:h.buttonTips.forecolor.title,tooltip:a?h.buttonTips.forecolor||g:g,tabIndex:-1,menu:Ext.widget("menu",{plain:true,items:[{xtype:"colorpicker",allowReselect:true,focus:Ext.emptyFn,value:"000000",plain:true,clickEvent:"mousedown",handler:function(k,i){h.relayCmd("forecolor",Ext.isWebKit||Ext.isIE?"#"+i:i);this.up("menu").hide()}}]})},{itemId:"backcolor",cls:d+"btn-icon",iconCls:d+"edit-backcolor",overflowText:h.buttonTips.backcolor.title,tooltip:a?h.buttonTips.backcolor||g:g,tabIndex:-1,menu:Ext.widget("menu",{plain:true,items:[{xtype:"colorpicker",focus:Ext.emptyFn,value:"FFFFFF",plain:true,allowReselect:true,clickEvent:"mousedown",handler:function(k,i){if(Ext.isGecko){h.execCmd("useCSS",false);h.execCmd("hilitecolor","#"+i);h.execCmd("useCSS",true);h.deferFocus()}else{h.relayCmd(Ext.isOpera?"hilitecolor":"backcolor",Ext.isWebKit||Ext.isIE||Ext.isOpera?"#"+i:i)}this.up("menu").hide()}}]})})}if(h.enableAlignments){b.push("-",c("justifyleft"),c("justifycenter"),c("justifyright"))}if(!Ext.isSafari2){if(h.enableLinks){b.push("-",c("createlink",false,h.createLink))}if(h.enableLists){b.push("-",c("insertorderedlist"),c("insertunorderedlist"))}if(h.enableSourceEdit){b.push("-",c("sourceedit",true,function(i){h.toggleSourceEdit(!h.sourceEditMode)}))}}for(e=0;e<b.length;e++){if(b[e].itemId!=="sourceedit"){b[e].disabled=true}}return{xtype:"toolbar",defaultButtonUI:h.defaultButtonUI,cls:Ext.baseCSSPrefix+"html-editor-tb",enableOverflow:true,items:b,listeners:{click:function(i){i.preventDefault()},element:"el"}}},getMaskTarget:function(){return Ext.isGecko?this.inputCmp.el:this.bodyEl},setReadOnly:function(e){var d=this,c=d.textareaEl,b=d.iframeEl,a;d.readOnly=e;if(c){c.dom.readOnly=e}if(d.initialized){a=d.getEditorBody();if(Ext.isIE){b.setDisplayed(false);a.contentEditable=!e;b.setDisplayed(true)}else{d.setDesignMode(!e)}if(a){a.style.cursor=e?"default":"text"}d.disableItems(e)}},getDocMarkup:function(){var b=this,a=b.iframeEl.getHeight()-b.iframePad*2,c=Ext.isIE8m;return Ext.String.format((c?"":"<!DOCTYPE html>")+'<html><head><style type="text/css">'+(Ext.isOpera?"p{margin:0}":"")+"body{border:0;margin:0;padding:{0}px;direction:"+(b.rtl?"rtl;":"ltr;")+(c?Ext.emptyString:"min-")+"height:{1}px;box-sizing:border-box;-moz-box-sizing:border-box;-webkit-box-sizing:border-box;cursor:text;background-color:white;"+(Ext.isIE?"":"font-size:12px;font-family:{2}")+"}</style></head><body></body></html>",b.iframePad,a,b.defaultFont)},getEditorBody:function(){var a=this.getDoc();return a.body||a.documentElement},getDoc:function(){return(!Ext.isIE&&this.iframeEl.dom.contentDocument)||this.getWin().document},getWin:function(){return Ext.isIE?this.iframeEl.dom.contentWindow:window.frames[this.iframeEl.dom.name]},initDefaultFont:function(){var h=this,a=0,j,b,k,e,d,g,c;if(!h.defaultFont){b=h.textareaEl.getStyle("font-family");b=Ext.String.capitalize(b.split(",")[0]);j=Ext.Array.clone(h.fontFamilies);Ext.Array.include(j,b);j.sort();h.defaultFont=b;k=h.down("#fontSelect").selectEl.dom;for(d=0,g=j.length;d<g;++d){b=j[d];c=b.toLowerCase();e=new Option(b,c);if(b==h.defaultFont){a=d}e.style.fontFamily=c;k.add(e)}k.options[a].selected=true}},afterRender:function(){var b=this,a=b.inputCmp;b.callParent(arguments);b.iframeEl=a.iframeEl;b.textareaEl=a.textareaEl;b.inputEl=b.iframeEl;b.initDefaultFont();b.monitorTask=Ext.TaskManager.start({run:b.checkDesignMode,scope:b,interval:100});b.relayCmd("fontName",b.defaultFont)},initFrameDoc:function(){var b=this,c,a;Ext.TaskManager.stop(b.monitorTask);c=b.getDoc();b.win=b.getWin();c.open();c.write(b.getDocMarkup());c.close();a={run:function(){var d=b.getDoc();if(d.body||d.readyState==="complete"){Ext.TaskManager.stop(a);b.setDesignMode(true);Ext.defer(b.initEditor,10,b)}},interval:10,duration:10000,scope:b};Ext.TaskManager.start(a)},checkDesignMode:function(){var a=this,b=a.getDoc();if(b&&(!b.editorInitialized||a.getDesignMode()!=="on")){a.initFrameDoc()}},setDesignMode:function(c){var a=this,b=a.getDoc();if(b){if(a.readOnly){c=false}b.designMode=(/on|true/i).test(String(c).toLowerCase())?"on":"off"}},getDesignMode:function(){var a=this.getDoc();return !a?"":String(a.designMode).toLowerCase()},disableItems:function(d){var b=this.getToolbar().items.items,c,a=b.length,e;for(c=0;c<a;c++){e=b[c];if(e.getItemId()!=="sourceedit"){e.setDisabled(d)}}},toggleSourceEdit:function(b){var g=this,d=g.iframeEl,a=g.textareaEl,e=Ext.baseCSSPrefix+"hidden",c=g.getToolbar().getComponent("sourceedit");if(!Ext.isBoolean(b)){b=!g.sourceEditMode}g.sourceEditMode=b;if(c.pressed!==b){c.toggle(b)}if(b){g.disableItems(true);g.syncValue();d.addCls(e);a.removeCls(e);a.dom.removeAttribute("tabIndex");a.focus();g.inputEl=a}else{if(g.initialized){g.disableItems(g.readOnly)}g.pushValue();d.removeCls(e);a.addCls(e);a.dom.setAttribute("tabIndex",-1);g.deferFocus();g.inputEl=d}g.fireEvent("editmodechange",g,b);g.updateLayout()},createLink:function(){var a=prompt(this.createLinkText,this.defaultLinkValue);if(a&&a!=="http://"){this.relayCmd("createlink",a)}},clearInvalid:Ext.emptyFn,setValue:function(c){var b=this,a=b.textareaEl;b.mixins.field.setValue.call(b,c);if(c===null||c===undefined){c=""}if(a){a.dom.value=c}b.pushValue();return this},cleanHtml:function(a){a=String(a);if(Ext.isWebKit){a=a.replace(/\sclass="(?:Apple-style-span|Apple-tab-span|khtml-block-placeholder)"/gi,"")}if(a.charCodeAt(0)===parseInt(this.defaultValue.replace(/\D/g,""),10)){a=a.substring(1)}return a},syncValue:function(){var e=this,b,g,d,a,c;if(e.initialized){b=e.getEditorBody();d=b.innerHTML;if(Ext.isWebKit){a=b.getAttribute("style");c=a.match(/text-align:(.*?);/i);if(c&&c[1]){d='<div style="'+c[0]+'">'+d+"</div>"}}d=e.cleanHtml(d);if(e.fireEvent("beforesync",e,d)!==false){if(e.textareaEl.dom.value!=d){e.textareaEl.dom.value=d;g=true}e.fireEvent("sync",e,d);if(g){e.checkChange()}}}},getValue:function(){var a=this,b;if(!a.sourceEditMode){a.syncValue()}b=a.rendered?a.textareaEl.dom.value:a.value;a.value=b;return b},pushValue:function(){var b=this,a;if(b.initialized){a=b.textareaEl.dom.value||"";if(!b.activated&&a.length<1){a=b.defaultValue}if(b.fireEvent("beforepush",b,a)!==false){b.getEditorBody().innerHTML=a;if(Ext.isGecko){b.setDesignMode(false);b.setDesignMode(true)}b.fireEvent("push",b,a)}}},deferFocus:function(){this.focus(false,true)},getFocusEl:function(){var a=this,b=a.win;return b&&!a.sourceEditMode?b:a.textareaEl},focus:function(d,b){var c=this,e,a;if(b){if(!c.focusTask){c.focusTask=new Ext.util.DelayedTask(c.focus)}c.focusTask.delay(Ext.isNumber(b)?b:10,null,c,[d,false])}else{if(d){if(c.textareaEl&&c.textareaEl.dom){e=c.textareaEl.dom.value}if(e&&e.length){c.execCmd("selectall",true)}}a=c.getFocusEl();if(a&&(a.isComponent||a.dom)){a.focus()}}return c},initEditor:function(){try{var g=this,d=g.getEditorBody(),b=g.textareaEl.getStyles("font-size","font-family","background-image","background-repeat","background-color","color"),i,c;b["background-attachment"]="fixed";d.bgProperties="fixed";Ext.DomHelper.applyStyles(d,b);i=g.getDoc();if(i){try{Ext.EventManager.removeAll(i)}catch(h){}}c=Ext.Function.bind(g.onEditorEvent,g);Ext.EventManager.on(i,{mousedown:c,dblclick:c,click:c,keyup:c,buffer:100});c=g.onRelayedEvent;Ext.EventManager.on(i,{mousedown:c,mousemove:c,mouseup:c,click:c,dblclick:c,scope:g});if(Ext.isGecko){Ext.EventManager.on(i,"keypress",g.applyCommand,g)}if(g.fixKeys){Ext.EventManager.on(i,"keydown",g.fixKeys,g)}if(Ext.isIE8m||(Ext.isIE9&&!Ext.isStrict)){Ext.EventManager.on(i,"focusout",function(){g.savedSelection=i.selection.type!=="None"?i.selection.createRange():null},g);Ext.EventManager.on(i,"focusin",function(){if(g.savedSelection){g.savedSelection.select()}},g)}Ext.EventManager.onWindowUnload(g.beforeDestroy,g);i.editorInitialized=true;g.initialized=true;g.pushValue();g.setReadOnly(g.readOnly);g.fireEvent("initialize",g)}catch(a){}},beforeDestroy:function(){var a=this,d=a.monitorTask,c,g;if(d){Ext.TaskManager.stop(d)}if(a.rendered){Ext.EventManager.removeUnloadListener(a.beforeDestroy,a);try{c=a.getDoc();if(c){Ext.EventManager.removeAll(Ext.fly(c));for(g in c){if(c.hasOwnProperty&&c.hasOwnProperty(g)){delete c[g]}}}}catch(b){}delete a.iframeEl;delete a.textareaEl;delete a.toolbar;delete a.inputCmp}a.callParent()},onRelayedEvent:function(c){var b=this.iframeEl,d=Ext.Element.getTrueXY(b),e=c.getXY(),a=Ext.EventManager.getPageXY(c.browserEvent);c.xy=[d[0]+a[0],d[1]+a[1]];c.injectEvent(b);c.xy=e},onFirstFocus:function(){var c=this,b,a;c.activated=true;c.disableItems(c.readOnly);if(Ext.isGecko){c.win.focus();b=c.win.getSelection();if(!b.focusNode||b.focusNode.nodeType!==3){a=b.getRangeAt(0);a.selectNodeContents(c.getEditorBody());a.collapse(true);c.deferFocus()}try{c.execCmd("useCSS",true);c.execCmd("styleWithCSS",false)}catch(d){}}c.fireEvent("activate",c)},adjustFont:function(d){var e=d.getItemId()==="increasefontsize"?1:-1,c=this.getDoc().queryCommandValue("FontSize")||"2",a=Ext.isString(c)&&c.indexOf("px")!==-1,b;c=parseInt(c,10);if(a){if(c<=10){c=1+e}else{if(c<=13){c=2+e}else{if(c<=16){c=3+e}else{if(c<=18){c=4+e}else{if(c<=24){c=5+e}else{c=6+e}}}}}c=Ext.Number.constrain(c,1,6)}else{b=Ext.isSafari;if(b){e*=2}c=Math.max(1,c+e)+(b?"px":0)}this.relayCmd("FontSize",c)},onEditorEvent:function(a){this.updateToolbar()},updateToolbar:function(){var j=this,e,c,d,k,b,g,a,h;if(j.readOnly){return}if(!j.activated){j.onFirstFocus();return}d=j.getToolbar().items.map;k=j.getDoc();if(j.enableFont&&!Ext.isSafari2){g=k.queryCommandValue("fontName");b=(g?g.split(",")[0].replace(/^'/,"").replace(/'$/,""):j.defaultFont).toLowerCase();a=j.fontSelect.dom;if(b!==a.value||b!=g){a.value=b}}function m(){for(e=0,c=arguments.length,b;e<c;e++){b=arguments[e];d[b].toggle(k.queryCommandState(b))}}if(j.enableFormat){m("bold","italic","underline")}if(j.enableAlignments){m("justifyleft","justifycenter","justifyright")}if(!Ext.isSafari2&&j.enableLists){m("insertorderedlist","insertunorderedlist")}h=j.toolbar.query("menu");for(e=0;e<h.length;e++){h[e].hide()}j.syncValue()},relayBtnCmd:function(a){this.relayCmd(a.getItemId())},relayCmd:function(b,a){Ext.defer(function(){var c=this;if(!this.isDestroyed){c.win.focus();c.execCmd(b,a);c.updateToolbar()}},10,this)},execCmd:function(c,b){var a=this,d=a.getDoc();d.execCommand(c,false,(b==undefined?null:b));a.syncValue()},applyCommand:function(d){if(d.ctrlKey){var a=this,g=d.getCharCode(),b;if(g>0){g=String.fromCharCode(g);switch(g){case"b":b="bold";break;case"i":b="italic";break;case"u":b="underline";break}if(b){a.win.focus();a.execCmd(b);a.deferFocus();d.preventDefault()}}}},insertAtCursor:function(c){var b=this,a;if(b.activated){b.win.focus();if(Ext.isIE){a=b.getDoc().selection.createRange();if(a){a.pasteHTML(c);b.syncValue();b.deferFocus()}}else{b.execCmd("InsertHTML",c);b.deferFocus()}}},fixKeys:(function(){if(Ext.isIE){return function(h){var c=this,b=h.getKey(),g=c.getDoc(),i=c.readOnly,a,d;if(b===h.TAB){h.stopEvent();if(!i){a=g.selection.createRange();if(a){a.collapse(true);a.pasteHTML("&#160;&#160;&#160;&#160;");c.deferFocus()}}}else{if(b===h.ENTER){if(!i){a=g.selection.createRange();if(a){d=a.parentElement();if(!d||d.tagName.toLowerCase()!=="li"){h.stopEvent();a.pasteHTML("<br />");a.collapse(false);a.select()}}}}}}}if(Ext.isOpera){return function(c){var b=this,a=c.getKey(),d=b.readOnly;if(a===c.TAB){c.stopEvent();if(!d){b.win.focus();b.execCmd("InsertHTML","&#160;&#160;&#160;&#160;");b.deferFocus()}}}}return null}()),getToolbar:function(){return this.toolbar},buttonTips:{bold:{title:"Bold (Ctrl+B)",text:"Make the selected text bold.",cls:Ext.baseCSSPrefix+"html-editor-tip"},italic:{title:"Italic (Ctrl+I)",text:"Make the selected text italic.",cls:Ext.baseCSSPrefix+"html-editor-tip"},underline:{title:"Underline (Ctrl+U)",text:"Underline the selected text.",cls:Ext.baseCSSPrefix+"html-editor-tip"},increasefontsize:{title:"Grow Text",text:"Increase the font size.",cls:Ext.baseCSSPrefix+"html-editor-tip"},decreasefontsize:{title:"Shrink Text",text:"Decrease the font size.",cls:Ext.baseCSSPrefix+"html-editor-tip"},backcolor:{title:"Text Highlight Color",text:"Change the background color of the selected text.",cls:Ext.baseCSSPrefix+"html-editor-tip"},forecolor:{title:"Font Color",text:"Change the color of the selected text.",cls:Ext.baseCSSPrefix+"html-editor-tip"},justifyleft:{title:"Align Text Left",text:"Align text to the left.",cls:Ext.baseCSSPrefix+"html-editor-tip"},justifycenter:{title:"Center Text",text:"Center text in the editor.",cls:Ext.baseCSSPrefix+"html-editor-tip"},justifyright:{title:"Align Text Right",text:"Align text to the right.",cls:Ext.baseCSSPrefix+"html-editor-tip"},insertunorderedlist:{title:"Bullet List",text:"Start a bulleted list.",cls:Ext.baseCSSPrefix+"html-editor-tip"},insertorderedlist:{title:"Numbered List",text:"Start a numbered list.",cls:Ext.baseCSSPrefix+"html-editor-tip"},createlink:{title:"Hyperlink",text:"Make the selected text a hyperlink.",cls:Ext.baseCSSPrefix+"html-editor-tip"},sourceedit:{title:"Source Edit",text:"Switch to source editing mode.",cls:Ext.baseCSSPrefix+"html-editor-tip"}}});Ext.define("Ext.form.field.Radio",{extend:Ext.form.field.Checkbox,alias:["widget.radiofield","widget.radio"],alternateClassName:"Ext.form.Radio",isRadio:true,focusCls:"form-radio-focus",inputType:"radio",ariaRole:"radio",formId:null,getGroupValue:function(){var a=this.getManager().getChecked(this.name,this.getFormId());return a?a.inputValue:null},onBoxClick:function(b){var a=this;if(!a.disabled&&!a.readOnly){this.setValue(true)}},onRemoved:function(){this.callParent(arguments);this.formId=null},setValue:function(a){var b=this,c;if(Ext.isBoolean(a)){b.callParent(arguments)}else{c=b.getManager().getWithValue(b.name,a,b.getFormId()).getAt(0);if(c){c.setValue(true)}}return b},getSubmitValue:function(){return this.checked?this.inputValue:null},getModelData:function(){return this.getSubmitData()},onChange:function(c,a){var g=this,e,d,b,h;g.callParent(arguments);if(c){h=g.getManager().getByName(g.name,g.getFormId()).items;d=h.length;for(e=0;e<d;e++){b=h[e];if(b!==g){b.setValue(false)}}}},getManager:function(){return Ext.form.RadioManager}});Ext.define("Ext.picker.Time",{extend:Ext.view.BoundList,alias:"widget.timepicker",increment:15,format:"g:i A",displayField:"disp",initDate:[2008,0,1],componentCls:Ext.baseCSSPrefix+"timepicker",loadMask:false,initComponent:function(){var c=this,a=Ext.Date,b=a.clearTime,d=c.initDate;c.absMin=b(new Date(d[0],d[1],d[2]));c.absMax=a.add(b(new Date(d[0],d[1],d[2])),"mi",(24*60)-1);c.store=c.createStore();c.store.addFilter(c.rangeFilter=new Ext.util.Filter({id:"time-picker-filter"}),false);c.updateList();c.callParent()},setMinValue:function(a){this.minValue=a;this.updateList()},setMaxValue:function(a){this.maxValue=a;this.updateList()},normalizeDate:function(a){var b=this.initDate;a.setFullYear(b[0],b[1],b[2]);return a},updateList:function(){var c=this,b=c.normalizeDate(c.minValue||c.absMin),a=c.normalizeDate(c.maxValue||c.absMax);c.rangeFilter.setFilterFn(function(d){var e=d.get("date");return e>=b&&e<=a});c.store.filter()},createStore:function(){var d=this,c=Ext.Date,e=[],b=d.absMin,a=d.absMax;while(b<=a){e.push({disp:c.dateFormat(b,d.format),date:b});b=c.add(b,"mi",d.increment)}return new Ext.data.Store({fields:["disp","date"],data:e})},focusNode:function(a){return false}});Ext.define("Ext.form.field.Time",{extend:Ext.form.field.ComboBox,alias:"widget.timefield",alternateClassName:["Ext.form.TimeField","Ext.form.Time"],triggerCls:Ext.baseCSSPrefix+"form-time-trigger",minText:"The time in this field must be equal to or after {0}",maxText:"The time in this field must be equal to or before {0}",invalidText:"{0} is not a valid time",format:"g:i A",altFormats:"g:ia|g:iA|g:i a|g:i A|h:i|g:i|H:i|ga|ha|gA|h a|g a|g A|gi|hi|gia|hia|g|H|gi a|hi a|giA|hiA|gi A|hi A",increment:15,pickerMaxHeight:300,selectOnTab:true,snapToIncrement:false,initDate:"1/1/2008",initDateFormat:"j/n/Y",ignoreSelection:0,queryMode:"local",displayField:"disp",valueField:"date",initComponent:function(){var c=this,b=c.minValue,a=c.maxValue;if(b){c.setMinValue(b)}if(a){c.setMaxValue(a)}c.displayTpl=new Ext.XTemplate('<tpl for=".">{[typeof values === "string" ? values : this.formatDate(values["'+c.displayField+'"])]}<tpl if="xindex < xcount">'+c.delimiter+"</tpl></tpl>",{formatDate:Ext.Function.bind(c.formatDate,c)});this.callParent()},transformOriginalValue:function(a){if(Ext.isString(a)){return this.rawToValue(a)}return a},isEqual:function(b,a){return Ext.Date.isEqual(b,a)},setMinValue:function(c){var b=this,a=b.picker;b.setLimit(c,true);if(a){a.setMinValue(b.minValue)}},setMaxValue:function(c){var b=this,a=b.picker;b.setLimit(c,false);if(a){a.setMaxValue(b.maxValue)}},setLimit:function(b,g){var a=this,e,c;if(Ext.isString(b)){e=a.parseDate(b)}else{if(Ext.isDate(b)){e=b}}if(e){c=Ext.Date.clearTime(new Date(a.initDate));c.setHours(e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds())}else{c=null}a[g?"minValue":"maxValue"]=c},rawToValue:function(a){return this.parseDate(a)||a||null},valueToRaw:function(a){return this.formatDate(this.parseDate(a))},getErrors:function(d){var b=this,g=Ext.String.format,h=b.callParent(arguments),c=b.minValue,e=b.maxValue,a;d=b.formatDate(d||b.processRawValue(b.getRawValue()));if(d===null||d.length<1){return h}a=b.parseDate(d);if(!a){h.push(g(b.invalidText,d,Ext.Date.unescapeFormat(b.format)));return h}if(c&&a<c){h.push(g(b.minText,b.formatDate(c)))}if(e&&a>e){h.push(g(b.maxText,b.formatDate(e)))}return h},formatDate:function(){return Ext.form.field.Date.prototype.formatDate.apply(this,arguments)},parseDate:function(e){var d=this,h=e,b=d.altFormats,g=d.altFormatsArray,c=0,a;if(e&&!Ext.isDate(e)){h=d.safeParse(e,d.format);if(!h&&b){g=g||b.split("|");a=g.length;for(;c<a&&!h;++c){h=d.safeParse(e,g[c])}}}if(h&&d.snapToIncrement){h=new Date(Ext.Number.snap(h.getTime(),d.increment*60*1000))}return h},safeParse:function(e,g){var d=this,b=Ext.Date,c,a=null;if(b.formatContainsDateInfo(g)){a=b.parse(e,g)}else{c=b.parse(d.initDate+" "+e,d.initDateFormat+" "+g);if(c){a=c}}return a},getSubmitValue:function(){var a=this,c=a.submitFormat||a.format,b=a.getValue();return b?Ext.Date.format(b,c):null},createPicker:function(){var b=this,a;b.listConfig=Ext.apply({xtype:"timepicker",selModel:{mode:"SINGLE"},cls:undefined,minValue:b.minValue,maxValue:b.maxValue,increment:b.increment,format:b.format,maxHeight:b.pickerMaxHeight},b.listConfig);a=b.callParent();b.bindStore(a.store);return a},onItemClick:function(b,a){var d=this,c=b.getSelectionModel().getSelection();if(c.length>0){c=c[0];if(c&&Ext.Date.isEqual(a.get("date"),c.get("date"))){d.collapse()}}},onListSelectionChange:function(b,d){if(d.length){var a=this,c=d[0].get("date");if(!a.ignoreSelection){a.skipSync=true;a.setValue(c);a.skipSync=false;a.fireEvent("select",a,c);a.picker.clearHighlight();a.collapse();a.inputEl.focus()}}},syncSelection:function(){var j=this,h=j.picker,c,g,k,b,i,e,a;if(h&&!j.skipSync){h.clearHighlight();k=j.getValue();g=h.getSelectionModel();j.ignoreSelection++;if(k===null){g.deselectAll()}else{if(Ext.isDate(k)){b=h.store.data.items;e=b.length;for(i=0;i<e;i++){a=b[i];if(Ext.Date.isEqual(a.get("date"),k)){c=a;break}}g.select(c)}}j.ignoreSelection--}},postBlur:function(){var a=this,b=a.getValue();a.callParent(arguments);if(a.wasValid&&b){a.setRawValue(a.formatDate(b))}},setValue:function(){this.getPicker();return this.callParent(arguments)},getValue:function(){return this.parseDate(this.callParent(arguments))}});Ext.define("Ext.grid.CellEditor",{extend:Ext.Editor,constructor:function(a){a=Ext.apply({},a);if(a.field){a.field.monitorTab=false}this.callParent([a])},onShow:function(){var a=this,d=a.boundEl.first(),b,c;if(d){if(a.isForTree){b=d.child("."+Ext.baseCSSPrefix+"tree-node-text",true);if(b){c=b.firstChild}}else{c=d.dom.lastChild}if(c&&c.nodeType===3){a.cellTextNode=c;a.cellTextValue=c.nodeValue;c.nodeValue=a.emptyText}}a.callParent(arguments)},onHide:function(){var b=this,c=b.boundEl.first(),a=b.cellTextNode;if(c&&a){if(a.nodeValue==b.emptyText){a.nodeValue=b.cellTextValue}delete b.cellTextNode;delete b.cellTextValue}b.callParent(arguments)},afterRender:function(){var a=this,b=a.field;a.callParent(arguments);if(b.isXType("checkboxfield")){b.mon(b.inputEl,{mousedown:a.onCheckBoxMouseDown,click:a.onCheckBoxClick,scope:a})}},onCheckBoxMouseDown:function(){this.completeEdit=Ext.emptyFn},onCheckBoxClick:function(){delete this.completeEdit;this.field.focus(false,10)},realign:function(d){var i=this,g=i.boundEl,h=g.first(),b=h.dom.childNodes,e=b.length,c=Ext.Array.clone(i.offsets),j,a;if(i.isForTree&&(e>1||(e===1&&b[0].nodeType!==3))){j=h.child("."+Ext.baseCSSPrefix+"tree-node-text");c[0]=j.getOffsetsTo(h)[0];a=h.getWidth()-c[0];i.addCls(Ext.baseCSSPrefix+"grid-cell-editor-on-text-node")}else{a=g.getWidth()-1}if(d===true){i.field.setWidth(a)}i.alignTo(g,i.alignment,c)},onEditorTab:function(b){var a=this.field;if(a.onEditorTab){a.onEditorTab(b)}},emptyText:"\u00a0",alignment:"tl-tl",hideEl:false,cls:Ext.baseCSSPrefix+"small-editor "+Ext.baseCSSPrefix+"grid-editor "+Ext.baseCSSPrefix+"grid-cell-editor",shim:false,shadow:false});Ext.define("Ext.grid.ColumnComponentLayout",{extend:Ext.layout.component.Auto,alias:"layout.columncomponent",type:"columncomponent",setWidthInDom:true,getContentHeight:function(a){return this.owner.isGroupHeader?a.getProp("contentHeight"):this.callParent(arguments)},calculateOwnerHeightFromContentHeight:function(c,b){var a=this.callParent(arguments);if(this.owner.isGroupHeader){a+=this.owner.titleEl.dom.offsetHeight}return a},getContentWidth:function(a){return this.owner.isGroupHeader?a.getProp("contentWidth"):this.callParent(arguments)},calculateOwnerWidthFromContentWidth:function(b,a){return a+b.getPaddingInfo().width}});Ext.define("Ext.grid.ColumnLayout",{extend:Ext.layout.container.HBox,alias:"layout.gridcolumn",type:"gridcolumn",reserveOffset:false,firstHeaderCls:Ext.baseCSSPrefix+"column-header-first",lastHeaderCls:Ext.baseCSSPrefix+"column-header-last",initLayout:function(){this.grid=this.owner.up("[scrollerOwner]");this.callParent()},beginLayout:function(c){var j=this,b=j.owner,a=j.grid,k=a.view,h=j.getVisibleItems(),g=h.length,d=j.firstHeaderCls,m=j.lastHeaderCls,e,l;if(a.lockable){if(b.up("tablepanel")===k.normalGrid){k=k.normalGrid.getView()}else{k=null}}for(e=0;e<g;e++){l=h[e];l.removeCls([d,m]);if(e===0){l.addCls(d)}if(e===g-1){l.addCls(m)}}j.callParent(arguments);if(!b.isHeader&&Ext.getScrollbarSize().width&&!a.collapsed&&k&&k.rendered&&(c.viewTable=k.body.dom)){c.viewContext=c.context.getCmp(k)}},beginLayoutCycle:function(e){this.callParent(arguments);var b=this.getVisibleItems(),a=b.length,c=0,d;for(;c<a;c++){d=b[c];d.el.setStyle({height:"auto"});d.titleEl.setStyle({paddingTop:"",paddingBottom:""})}},roundFlex:function(a){return Math.floor(a)},calculate:function(a){this.callParent(arguments);if(a.state.parallelDone){a.setProp("columnWidthsDone",true)}if(a.viewContext){a.state.tableHeight=a.viewTable.offsetHeight}},completeLayout:function(d){var b=this,a=b.owner,c=d.state;b.callParent(arguments);if(!d.flexedItems.length&&!c.flexesCalculated&&a.forceFit&&!a.isHeader){if(b.convertWidthsToFlexes(d)){b.cacheFlexes(d);d.invalidate({state:{flexesCalculated:true}})}}},convertWidthsToFlexes:function(a){var g=this,d=0,h=g.sizeModels.calculated,c,e,b,k,j;c=a.childItems;e=c.length;for(b=0;b<e;b++){k=c[b];j=k.target;d+=k.props.width;j.flex=a.childItems[b].flex=k.props.width;j.width=null;k.widthModel=h}return d!==a.props.width},finalizeLayout:function(g){var e=this,d=0,c=e.getVisibleItems(),a=c.length,b;b=g.props.height;if(e.owner.isGroupHeader){b-=e.owner.titleEl.dom.offsetHeight}for(;d<a;d++){c[d].setPadding(g.childItems[d],b)}},getContainerSize:function(e){var d=this,a=d.callParent(arguments),c=e.viewContext,b;if(c&&!c.heightModel.shrinkWrap&&c.target.componentLayout.ownerContext){b=c.getProp("height");if(isNaN(b)){d.done=false}else{if(e.state.tableHeight>b){a.width-=Ext.getScrollbarSize().width;e.state.parallelDone=false;c.invalidate()}}}return a},publishInnerCtSize:function(e){var d=this,c=e.state.boxPlan.targetSize,b=e.peek("contentWidth"),a;d.owner.tooNarrow=e.state.boxPlan.tooNarrow;if((b!=null)&&!d.owner.isHeader){c.width=b;a=d.owner.ownerCt.view;if(a.scrollFlags.y){c.width+=Ext.getScrollbarSize().width}}return d.callParent(arguments)}});Ext.define("Ext.layout.container.Fit",{extend:Ext.layout.container.Container,alternateClassName:"Ext.layout.FitLayout",alias:"layout.fit",itemCls:Ext.baseCSSPrefix+"fit-item",targetCls:Ext.baseCSSPrefix+"layout-fit",type:"fit",defaultMargins:{top:0,right:0,bottom:0,left:0},manageMargins:true,sizePolicies:{0:{readsWidth:1,readsHeight:1,setsWidth:0,setsHeight:0},1:{readsWidth:0,readsHeight:1,setsWidth:1,setsHeight:0},2:{readsWidth:1,readsHeight:0,setsWidth:0,setsHeight:1},3:{readsWidth:0,readsHeight:0,setsWidth:1,setsHeight:1}},getItemSizePolicy:function(b,c){var a=c||this.owner.getSizeModel(),d=(a.width.shrinkWrap?0:1)|(a.height.shrinkWrap?0:2);return this.sizePolicies[d]},beginLayoutCycle:function(k,g){var t=this,u=t.lastHeightModel&&t.lastHeightModel.calculated,h=t.lastWidthModel&&t.lastWidthModel.calculated,o=h||u,l=0,m=0,s,b,p,r,e,a,j,n,q,d;t.callParent(arguments);if(o&&k.targetContext.el.dom.tagName.toUpperCase()!="TD"){o=h=u=false}b=k.childItems;e=b.length;for(p=0;p<e;++p){r=b[p];if(g){s=r.target;j=s.minHeight;n=s.minWidth;if(n||j){a=r.marginInfo||r.getMarginInfo();j+=a.height;n+=a.height;if(l<j){l=j}if(m<n){m=n}}}if(o){q=r.el.dom.style;if(u){q.height=""}if(h){q.width=""}}}if(g){k.maxChildMinHeight=l;k.maxChildMinWidth=m}s=k.target;k.overflowX=(!k.widthModel.shrinkWrap&&k.maxChildMinWidth&&s.scrollFlags.x)||d;k.overflowY=(!k.heightModel.shrinkWrap&&k.maxChildMinHeight&&s.scrollFlags.y)||d},calculate:function(g){var o=this,l=g.childItems,d=l.length,c=o.getContainerSize(g),e={length:d,ownerContext:g,targetSize:c},r=g.widthModel.shrinkWrap,m=g.heightModel.shrinkWrap,k=g.overflowX,h=g.overflowY,n,b,p,j,a,q;if(k||h){n=o.getScrollbarsNeeded(k&&c.width,h&&c.height,g.maxChildMinWidth,g.maxChildMinHeight);if(n){b=Ext.getScrollbarSize();if(n&1){c.height-=b.height}if(n&2){c.width-=b.width}}}for(j=0;j<d;++j){e.index=j;o.fitItem(l[j],e)}if(m||r){p=g.targetContext.getPaddingInfo();if(r){if(h&&!c.gotHeight){o.done=false}else{a=e.contentWidth+p.width;if(n&2){a+=b.width}if(!g.setContentWidth(a)){o.done=false}}}if(m){if(k&&!c.gotWidth){o.done=false}else{q=e.contentHeight+p.height;if(n&1){q+=b.height}if(!g.setContentHeight(q)){o.done=false}}}}},fitItem:function(b,c){var a=this;if(b.invalid){a.done=false;return}c.margins=b.getMarginInfo();c.needed=c.got=0;a.fitItemWidth(b,c);a.fitItemHeight(b,c);if(c.got!=c.needed){a.done=false}},fitItemWidth:function(c,d){var a,b;if(d.ownerContext.widthModel.shrinkWrap){b=c.getProp("width")+d.margins.width;a=d.contentWidth;if(a===undefined){d.contentWidth=b}else{d.contentWidth=Math.max(a,b)}}else{if(c.widthModel.calculated){++d.needed;if(d.targetSize.gotWidth){++d.got;this.setItemWidth(c,d)}}}this.positionItemX(c,d)},fitItemHeight:function(c,d){var b,a;if(d.ownerContext.heightModel.shrinkWrap){a=c.getProp("height")+d.margins.height;b=d.contentHeight;if(b===undefined){d.contentHeight=a}else{d.contentHeight=Math.max(b,a)}}else{if(c.heightModel.calculated){++d.needed;if(d.targetSize.gotHeight){++d.got;this.setItemHeight(c,d)}}}this.positionItemY(c,d)},positionItemX:function(a,c){var b=c.margins;if(c.index||b.left){a.setProp("x",b.left)}if(b.width){a.setProp("margin-right",b.width)}},positionItemY:function(a,c){var b=c.margins;if(c.index||b.top){a.setProp("y",b.top)}if(b.height){a.setProp("margin-bottom",b.height)}},setItemHeight:function(a,b){a.setHeight(b.targetSize.height-b.margins.height)},setItemWidth:function(a,b){a.setWidth(b.targetSize.width-b.margins.width)}});Ext.define("Ext.panel.Table",{extend:Ext.panel.Panel,alias:"widget.tablepanel",extraBaseCls:Ext.baseCSSPrefix+"grid",extraBodyCls:Ext.baseCSSPrefix+"grid-body",layout:"fit",hasView:false,viewType:null,selType:"rowmodel",scroll:true,deferRowRender:true,sortableColumns:true,enableLocking:false,scrollerOwner:true,enableColumnMove:true,sealedColumns:false,enableColumnResize:true,rowLines:true,colLinesCls:Ext.baseCSSPrefix+"grid-with-col-lines",rowLinesCls:Ext.baseCSSPrefix+"grid-with-row-lines",hiddenHeaderCtCls:Ext.baseCSSPrefix+"grid-header-ct-hidden",hiddenHeaderCls:Ext.baseCSSPrefix+"grid-header-hidden",resizeMarkerCls:Ext.baseCSSPrefix+"grid-resize-marker",emptyCls:Ext.baseCSSPrefix+"grid-empty",initComponent:function(){var e=this,g=e.columns||e.colModel,b,d,a,c=e.store=Ext.data.StoreManager.lookup(e.store||"ext-empty-store");if(e.columnLines){e.addCls(e.colLinesCls)}if(e.rowLines){e.addCls(e.rowLinesCls)}if(g instanceof Ext.grid.header.Container){e.headerCt=g;e.headerCt.isRootHeader=true;e.columns=e.headerCt.items.items}else{if(Ext.isArray(g)){g={items:g}}Ext.apply(g,{forceFit:e.forceFit,sortable:e.sortableColumns,enableColumnMove:e.enableColumnMove,enableColumnResize:e.enableColumnResize,sealed:e.sealedColumns,isRootHeader:true});if(Ext.isDefined(e.enableColumnHide)){g.enableColumnHide=e.enableColumnHide}e.columns=g.items;if(e.enableLocking||e.hasLockedColumns(e.columns)){e.self.mixin("lockable",Ext.grid.locking.Lockable);e.injectLockable()}}e.scrollTask=new Ext.util.DelayedTask(e.syncHorizontalScroll,e);e.addEvents("reconfigure","viewready");e.bodyCls=e.bodyCls||"";e.bodyCls+=(" "+e.extraBodyCls);e.cls=e.cls||"";e.cls+=(" "+e.extraBaseCls);delete e.autoScroll;if(!e.hasView){if(!e.headerCt){e.headerCt=new Ext.grid.header.Container(g)}e.columns=e.headerCt.items.items;if(c.buffered&&!c.remoteSort){for(d=0,a=e.columns.length;d<a;d++){e.columns[d].sortable=false}}if(e.hideHeaders){e.headerCt.height=0;e.headerCt.hiddenHeaders=true;e.headerCt.addCls(e.hiddenHeaderCtCls);e.addCls(e.hiddenHeaderCls);if(Ext.isIEQuirks){e.headerCt.style={display:"none"}}}e.relayHeaderCtEvents(e.headerCt);e.features=e.features||[];if(!Ext.isArray(e.features)){e.features=[e.features]}e.dockedItems=[].concat(e.dockedItems||[]);e.dockedItems.unshift(e.headerCt);e.viewConfig=e.viewConfig||{};b=e.getView();e.items=[b];e.hasView=true;if(!e.hideHeaders){b.on({scroll:{fn:e.onHorizontalScroll,element:"el",scope:e}})}e.bindStore(c,true);e.mon(b,{viewready:e.onViewReady,refresh:e.onRestoreHorzScroll,scope:e})}e.relayEvents(e.view,["beforeitemmousedown","beforeitemmouseup","beforeitemmouseenter","beforeitemmouseleave","beforeitemclick","beforeitemdblclick","beforeitemcontextmenu","itemmousedown","itemmouseup","itemmouseenter","itemmouseleave","itemclick","itemdblclick","itemcontextmenu","beforecellclick","cellclick","beforecelldblclick","celldblclick","beforecellcontextmenu","cellcontextmenu","beforecellmousedown","cellmousedown","beforecellmouseup","cellmouseup","beforecellkeydown","cellkeydown","beforecontainermousedown","beforecontainermouseup","beforecontainermouseover","beforecontainermouseout","beforecontainerclick","beforecontainerdblclick","beforecontainercontextmenu","containermouseup","containermouseover","containermouseout","containerclick","containerdblclick","containercontextmenu","selectionchange","beforeselect","select","beforedeselect","deselect"]);e.callParent(arguments);e.addStateEvents(["columnresize","columnmove","columnhide","columnshow","sortchange","filterchange"]);if(!e.lockable&&e.headerCt){e.headerCt.on("afterlayout",e.onRestoreHorzScroll,e)}},hasLockedColumns:function(c){var b,a=c.length,d;for(b=0;b<a;b++){d=c[b];if(!d.processed&&d.locked){return true}}},relayHeaderCtEvents:function(a){this.relayEvents(a,["columnresize","columnmove","columnhide","columnshow","columnschanged","sortchange","headerclick","headercontextmenu","headertriggerclick"])},getState:function(){var b=this,c=b.callParent(),a=b.store.getState();c=b.addPropertyToState(c,"columns",b.headerCt.getColumnsState());if(a){c.storeState=a}return c},applyState:function(e){var d=this,g=e.sort,a=e.storeState,b=d.store,c=e.columns;delete e.columns;d.callParent(arguments);if(c){d.headerCt.applyColumnsState(c)}if(g){if(b.remoteSort){b.sort({property:g.property,direction:g.direction,root:g.root},null,false)}else{b.sort(g.property,g.direction)}}else{if(a){b.applyState(a)}}},getStore:function(){return this.store},getView:function(){var a=this,b;if(!a.view){b=a.getSelectionModel();Ext.widget(Ext.apply({grid:a,deferInitialRefresh:a.deferRowRender!==false,trackOver:a.trackMouseOver!==false,scroll:a.scroll,xtype:a.viewType,store:a.store,headerCt:a.headerCt,selModel:b,features:a.features,panel:a,emptyText:a.emptyText||""},a.viewConfig));if(a.view.emptyText){a.view.emptyText='<div class="'+a.emptyCls+'">'+a.view.emptyText+"</div>"}a.view.getComponentLayout().headerCt=a.headerCt;a.mon(a.view,{uievent:a.processEvent,scope:a});b.view=a.view;a.headerCt.view=a.view}return a.view},setAutoScroll:Ext.emptyFn,processEvent:function(g,b,a,c,d,i){var h=this,j;if(d!==-1){j=h.headerCt.getGridColumns()[d];return j.processEvent.apply(j,arguments)}},determineScrollbars:function(){},invalidateScroller:function(){},scrollByDeltaY:function(b,a){this.getView().scrollBy(0,b,a)},scrollByDeltaX:function(b,a){this.getView().scrollBy(b,0,a)},afterCollapse:function(){var a=this;a.saveScrollPos();a.saveScrollPos();a.callParent(arguments)},afterExpand:function(){var a=this;a.callParent(arguments);a.restoreScrollPos();a.restoreScrollPos()},saveScrollPos:Ext.emptyFn,restoreScrollPos:Ext.emptyFn,onHeaderResize:function(){this.delayScroll()},onHeaderMove:function(e,g,a,b,d){var c=this;if(c.optimizedColumnMove===false){c.view.refresh()}else{c.view.moveColumn(b,d,a)}c.delayScroll()},onHeaderHide:function(a,b){this.delayScroll()},onHeaderShow:function(a,b){this.delayScroll()},delayScroll:function(){var a=this.getScrollTarget().el;if(a){this.scrollTask.delay(10,null,null,[a.dom.scrollLeft])}},onViewReady:function(){this.fireEvent("viewready",this)},onRestoreHorzScroll:function(){var a=this.scrollLeftPos;if(a){this.syncHorizontalScroll(a,true)}},getScrollerOwner:function(){var a=this;if(!this.scrollerOwner){a=this.up("[scrollerOwner]")}return a},getLhsMarker:function(){var a=this;return a.lhsMarker||(a.lhsMarker=Ext.DomHelper.append(a.el,{cls:a.resizeMarkerCls},true))},getRhsMarker:function(){var a=this;return a.rhsMarker||(a.rhsMarker=Ext.DomHelper.append(a.el,{cls:a.resizeMarkerCls},true))},getSelectionModel:function(){var c=this,a=c.selModel,e,d,b;if(!a){a={};e=true}if(!a.events){b=a.selType||c.selType;e=!a.mode;a=c.selModel=Ext.create("selection."+b,a)}if(c.simpleSelect){d="SIMPLE"}else{if(c.multiSelect){d="MULTI"}}Ext.applyIf(a,{allowDeselect:c.allowDeselect});if(d&&e){a.setSelectionMode(d)}if(!a.hasRelaySetup){c.relayEvents(a,["selectionchange","beforeselect","beforedeselect","select","deselect"]);a.hasRelaySetup=true}if(c.disableSelection){a.locked=true}return a},getScrollTarget:function(){var a=this.getScrollerOwner(),b=a.query("tableview");return b[1]||b[0]},onHorizontalScroll:function(a,b){this.syncHorizontalScroll(b.scrollLeft)},syncHorizontalScroll:function(d,b){var c=this,a;b=b===true;if(c.rendered&&(b||d!==c.scrollLeftPos)){if(b){a=c.getScrollTarget();a.el.dom.scrollLeft=d}c.headerCt.el.dom.scrollLeft=d;c.scrollLeftPos=d}},onStoreLoad:Ext.emptyFn,getEditorParent:function(){return this.body},bindStore:function(b,c){var d=this,a=d.getView(),e=b&&b.buffered,g;d.store=b;if(a.store!==b){if(c){a.bindStore(b,false,"dataSource")}else{a.bindStore(b,false)}}d.mon(b,{load:d.onStoreLoad,scope:d});d.storeRelayers=d.relayEvents(b,["filterchange"]);g=d.findPlugin("bufferedrenderer");if(g){d.verticalScroller=g;if(g.store){g.bindStore(b)}}else{if(e){d.verticalScroller=g=d.addPlugin(Ext.apply({ptype:"bufferedrenderer"},d.initialConfig.verticalScroller))}}if(g){d.invalidateScrollerOnRefresh=false}if(d.invalidateScrollerOnRefresh!==undefined){a.preserveScrollOnRefresh=!d.invalidateScrollerOnRefresh}},unbindStore:function(){var b=this,a=b.store;if(a){b.store=null;b.mun(a,{load:b.onStoreLoad,scope:b});Ext.destroy(b.storeRelayers)}},reconfigure:function(b,e){var g=this,a=g.getView(),d,i=g.store,h=g.headerCt,c=h?h.items.getRange():g.columns;if(e){e=Ext.Array.slice(e);delete a.tpl}g.fireEvent("beforereconfigure",g,b,e,i,c);if(g.lockable){g.reconfigureLockable(b,e)}else{Ext.suspendLayouts();if(e){delete g.scrollLeftPos;h.removeAll();h.add(e)}if(b&&b!==i){if(g.store){g.unbindStore()}b=Ext.StoreManager.lookup(b);d=a.deferInitialRefresh;a.deferInitialRefresh=false;g.bindStore(b);a.deferInitialRefresh=d}else{g.getView().refresh()}h.setSortState();Ext.resumeLayouts(true)}g.fireEvent("reconfigure",g,b,e,i,c)},beforeDestroy:function(){var a=this.scrollTask;if(a){a.cancel();this.scrollTask=null}this.callParent()},onDestroy:function(){if(this.lockable){this.destroyLockable()}this.callParent()}});Ext.define("Ext.util.CSS",function(){var c,e=null,d=document,b=/(-[a-z])/gi,a=function(g,h){return h.charAt(1).toUpperCase()};return{singleton:true,rules:e,initialized:false,constructor:function(){c=this},createStyleSheet:function(i,l){var h,g=d.getElementsByTagName("head")[0],k=d.createElement("style");k.setAttribute("type","text/css");if(l){k.setAttribute("id",l)}if(Ext.isIE){g.appendChild(k);h=k.styleSheet;h.cssText=i}else{try{k.appendChild(d.createTextNode(i))}catch(j){k.cssText=i}g.appendChild(k);h=k.styleSheet?k.styleSheet:(k.sheet||d.styleSheets[d.styleSheets.length-1])}c.cacheStyleSheet(h);return h},removeStyleSheet:function(h){var g=d.getElementById(h);if(g){g.parentNode.removeChild(g)}},swapStyleSheet:function(i,g){var h;c.removeStyleSheet(i);h=d.createElement("link");h.setAttribute("rel","stylesheet");h.setAttribute("type","text/css");h.setAttribute("id",i);h.setAttribute("href",g);d.getElementsByTagName("head")[0].appendChild(h)},refreshCache:function(){return c.getRules(true)},cacheStyleSheet:function(m){if(!e){e=c.rules={}}try{var p=m.cssRules||m.rules,l=p.length-1,h=m.imports,g=h?h.length:0,o,k;for(k=0;k<g;++k){c.cacheStyleSheet(h[k])}for(;l>=0;--l){o=p[l];if(o.styleSheet){c.cacheStyleSheet(o.styleSheet)}c.cacheRule(o,m)}}catch(n){}},cacheRule:function(h,l){if(h.styleSheet){return c.cacheStyleSheet(h.styleSheet)}var k=h.selectorText,i,g;if(k){k=k.split(",");i=k.length;for(g=0;g<i;g++){e[Ext.String.trim(k[g]).toLowerCase()]={parentStyleSheet:l,cssRule:h}}}},getRules:function(i){var h={},g;if(e===null||i){c.refreshCache()}for(g in e){h[g]=e[g].cssRule}return h},refreshCache:function(){var j=d.styleSheets,h=0,g=j.length;e=c.rules={};for(;h<g;h++){try{if(!j[h].disabled){c.cacheStyleSheet(j[h])}}catch(k){}}},getRule:function(h,k,j){var l,g;if(!e||k){c.refreshCache()}if(!Ext.isArray(h)){g=e[h.toLowerCase()];if(g&&!j){g=g.cssRule}return g||null}for(l=0;l<h.length;l++){if(e[h[l]]){return j?e[h[l].toLowerCase()]:e[h[l].toLowerCase()].cssRule}}return null},createRule:function(l,h,j){var g,k=l.cssRules||l.rules,i=k.length;if(l.insertRule){l.insertRule(h+"{"+j+"}",i)}else{l.addRule(h,j||" ")}c.cacheRule(g=k[i],l);return g},updateRule:function(g,l,k){var m,h,j;if(!Ext.isArray(g)){m=c.getRule(g);if(m){if(arguments.length==2){j=Ext.Element.parseStyles(l);for(l in j){m.style[l.replace(b,a)]=j[l]}}else{m.style[l.replace(b,a)]=k}return true}}else{for(h=0;h<g.length;h++){if(c.updateRule(g[h],l,k)){return true}}}return false},deleteRule:function(g){var i=c.getRule(g,false,true),j,h;if(i){j=i.parentStyleSheet;h=Ext.Array.indexOf(j.cssRules||j.rules,i.cssRule);if(j.deleteRule){j.deleteRule(h)}else{j.removeRule(h)}delete e[g]}}}});Ext.define("Ext.view.TableLayout",{extend:Ext.layout.component.Auto,alias:["layout.tableview"],type:"tableview",beginLayout:function(d){var c=this,b=c.owner.lockingPartner,a=c.owner;c.callParent(arguments);if(b){c.lockedGrid=c.owner.up("[lockable]");c.lockedGrid.needsRowHeightSync=true;if(!d.lockingPartner){d.lockingPartner=d.context.getItem(b,b.el);if(d.lockingPartner&&!d.lockingPartner.lockingPartner){d.lockingPartner.lockingPartner=d}}}d.headerContext=d.context.getCmp(c.headerCt);if(c.owner.body.dom){d.bodyContext=d.getEl(c.owner.body)}if(Ext.isWebKit){a.el.select(a.getBodySelector()).setStyle("table-layout","auto")}},calculate:function(d){var c=this,a=c.lockingPartner,b;if(d.headerContext.hasProp("columnWidthsDone")){c.setColumnWidths(d);d.state.columnWidthsSynced=true;if(d.bodyContext){d.bodyContext.setHeight(b=d.bodyContext.el.dom.offsetHeight,false);d.setProp("contentHeight",b)}if(a&&!a.state.columnWidthsSynced){c.done=false}else{c.callParent(arguments)}}else{c.done=false}},measureContentHeight:function(b){var a=b.lockingPartner;if(!b.bodyContext||(b.state.columnWidthsSynced&&(!a||a.state.columnWidthsSynced))){return this.callParent(arguments)}},setColumnWidths:function(c){var m=this,b=m.owner,a=c.context,e=m.headerCt.getGridColumns(),d,j=0,l=e.length,k=0,h,g=!Ext.isBorderBox;if(a){a.currentLayout=m}for(j=0;j<l;j++){d=e[j];if(d.hidden||d.hiddenAncestor){h=0}else{h=a.getCmp(d).props.width;k+=h;if(g){h-=a.getCmp(d).borderInfo.width}}b.body.select(b.getColumnSizerSelector(d)).setWidth(h)}b.el.select(b.getBodySelector()).setWidth(k)},finishedLayout:function(){var b=this,a=b.owner;b.callParent(arguments);if(Ext.isWebKit){a.el.select(a.getBodySelector()).setStyle("table-layout","")}if(a.refreshCounter&&b.lockedGrid&&b.lockedGrid.syncRowHeight&&b.lockedGrid.needsRowHeightSync){b.lockedGrid.syncRowHeights();b.lockedGrid.needsRowHeightSync=false}}});Ext.define("Ext.view.NodeCache",{constructor:function(a){this.view=a;this.clear();this.el=new Ext.dom.AbstractElement.Fly()},clear:function(e){var c=this,d=this.elements,a,b;if(e){for(a in d){b=d[a];b.parentNode.removeChild(b)}}c.elements={};c.count=c.startIndex=0;c.endIndex=-1},fill:function(b,g){var d=this,e=d.elements={},c,a=b.length;if(!g){g=0}for(c=0;c<a;c++){e[g+c]=b[c]}d.startIndex=g;d.endIndex=g+a-1;d.count=a;return this},insert:function(g,b){var d=this,e=d.elements,c,a=b.length;if(d.count){if(g<d.count){for(c=d.endIndex+a;c>=g+a;c--){e[c]=e[c-a];e[c].setAttribute("data-recordIndex",c)}}d.endIndex=d.endIndex+a}else{d.startIndex=g;d.endIndex=g+a-1}for(c=0;c<a;c++,g++){e[g]=b[c];e[g].setAttribute("data-recordIndex",g)}d.count+=a},item:function(c,b){var d=this.elements[c],a=null;if(d){a=b?this.elements[c]:this.el.attach(this.elements[c])}return a},first:function(a){return this.item(this.startIndex,a)},last:function(a){return this.item(this.endIndex,a)},getCount:function(){return this.count},slice:function(e,b){var d=this.elements,a=[],c;if(arguments.length<2){b=this.endIndex}else{b=Math.min(this.endIndex,b-1)}for(c=e||this.startIndex;c<=b;c++){a.push(d[c])}return a},replaceElement:function(d,c,a){var e=this.elements,b=(typeof d==="number")?d:this.indexOf(d);if(b>-1){c=Ext.getDom(c);if(a){d=e[b];d.parentNode.insertBefore(c,d);Ext.removeNode(d);c.setAttribute("data-recordIndex",b)}this.elements[b]=c}return this},indexOf:function(b){var c=this.elements,a;b=Ext.getDom(b);for(a=this.startIndex;a<=this.endIndex;a++){if(c[a]===b){return a}}return -1},removeRange:function(b,g,d){var j=this,a=j.elements,e,h,c,k;if(g===undefined){g=j.count}else{g=Math.min(j.endIndex+1,g+1)}if(!b){b=0}c=g-b;for(h=b,k=g;h<j.endIndex;h++,k++){if(d&&h<g){Ext.removeNode(a[h])}if(k<=j.endIndex){e=a[h]=a[k];e.setAttribute("data-recordIndex",h)}else{delete a[h]}}j.count-=c;j.endIndex-=c},removeElement:function(j,c){var h=this,a=h.elements,d,e,b=0,g,i;if(Ext.isArray(j)){e=j.length;for(b=0;b<e;b++){if(typeof j[b]!=="number"){j[b]=h.indexOf(j[b])}}Ext.Array.sort(j)}else{e=1;j=[j]}for(g=i=j[0],b=0;g<=h.endIndex;g++,i++){if(b<e&&g===j[b]){i++;b++;if(c){Ext.removeNode(a[g])}}if(i<=h.endIndex&&i>=h.startIndex){d=a[g]=a[i];d.setAttribute("data-recordIndex",g)}else{delete a[g]}}h.endIndex-=e;h.count-=e},scroll:function(e,l,c){var k=this,a=k.elements,n=e.length,h,d,b,g,j=k.view.getNodeContainer(),m=document.createDocumentFragment();if(l==-1){for(h=(k.endIndex-c)+1;h<=k.endIndex;h++){d=a[h];delete a[h];d.parentNode.removeChild(d)}k.endIndex-=c;g=k.view.bufferRender(e,k.startIndex-=n);for(h=0;h<n;h++){a[k.startIndex+h]=g[h];m.appendChild(g[h])}j.insertBefore(m,j.firstChild)}else{b=k.startIndex+c;for(h=k.startIndex;h<b;h++){d=a[h];delete a[h];d.parentNode.removeChild(d)}k.startIndex=h;g=k.view.bufferRender(e,k.endIndex+1);for(h=0;h<n;h++){a[k.endIndex+=1]=g[h];m.appendChild(g[h])}j.appendChild(m)}k.count=k.endIndex-k.startIndex+1}});Ext.define("Ext.view.Table",{extend:Ext.view.View,alias:"widget.tableview",componentLayout:"tableview",baseCls:Ext.baseCSSPrefix+"grid-view",firstCls:Ext.baseCSSPrefix+"grid-cell-first",lastCls:Ext.baseCSSPrefix+"grid-cell-last",headerRowSelector:"tr."+Ext.baseCSSPrefix+"grid-header-row",selectedItemCls:Ext.baseCSSPrefix+"grid-row-selected",selectedCellCls:Ext.baseCSSPrefix+"grid-cell-selected",focusedItemCls:Ext.baseCSSPrefix+"grid-row-focused",overItemCls:Ext.baseCSSPrefix+"grid-row-over",altRowCls:Ext.baseCSSPrefix+"grid-row-alt",dirtyCls:Ext.baseCSSPrefix+"grid-dirty-cell",rowClsRe:new RegExp("(?:^|\\s*)"+Ext.baseCSSPrefix+"grid-row-(first|last|alt)(?:\\s+|$)","g"),cellRe:new RegExp(Ext.baseCSSPrefix+"grid-cell-([^\\s]+) ",""),positionBody:true,trackOver:true,getRowClass:null,stripeRows:true,markDirty:true,tpl:"{%values.view.tableTpl.applyOut(values, out)%}",tableTpl:['<table id="{view.id}-table" class="'+Ext.baseCSSPrefix+"{view.id}-table "+Ext.baseCSSPrefix+'grid-table" border="0" cellspacing="0" cellpadding="0" style="{tableStyle}" tabIndex="-1">',"{[values.view.renderColumnSizer(out)]}","{[values.view.renderTHead(values, out)]}","{[values.view.renderTFoot(values, out)]}",'<tbody id="{view.id}-body">',"{%","values.view.renderRows(values.rows, values.viewStartIndex, out);","%}","</tbody>","</table>",{priority:0}],rowTpl:["{%",'var dataRowCls = values.recordIndex === -1 ? "" : " '+Ext.baseCSSPrefix+'grid-data-row";',"%}",'<tr {[values.rowId ? ("id=\\"" + values.rowId + "\\"") : ""]} ','data-boundView="{view.id}" ','data-recordId="{record.internalId}" ','data-recordIndex="{recordIndex}" ','class="{[values.itemClasses.join(" ")]} {[values.rowClasses.join(" ")]}{[dataRowCls]}" ','{rowAttr:attributes} tabIndex="-1">','<tpl for="columns">{%',"parent.view.renderCell(values, parent.record, parent.recordIndex, xindex - 1, out, parent)","%}","</tpl>","</tr>",{priority:0}],cellTpl:['<td class="{tdCls}" {tdAttr}>','<div {unselectableAttr} class="'+Ext.baseCSSPrefix+'grid-cell-inner"','style="text-align:{align};<tpl if="style">{style}</tpl>">{value}</div>',"</td>",{priority:0}],refreshSelmodelOnRefresh:false,tableValues:{},rowValues:{itemClasses:[],rowClasses:[]},cellValues:{classes:[Ext.baseCSSPrefix+"grid-cell "+Ext.baseCSSPrefix+"grid-td"]},renderBuffer:document.createElement("div"),constructor:function(a){if(a.grid.isTree){a.baseCls=Ext.baseCSSPrefix+"tree-view"}this.callParent([a])},initComponent:function(){var b=this,a=b.scroll;this.addEvents("beforecellclick","cellclick","beforecelldblclick","celldblclick","beforecellcontextmenu","cellcontextmenu","beforecellmousedown","cellmousedown","beforecellmouseup","cellmouseup","beforecellkeydown","cellkeydown");b.body=new Ext.dom.Element.Fly();b.body.id=b.id+"gridBody";b.autoScroll=undefined;if(!b.trackOver){b.overItemCls=null}if(a===true||a==="both"){b.autoScroll=true}else{if(a==="horizontal"){b.overflowX="auto"}else{if(a==="vertical"){b.overflowY="auto"}}}b.selModel.view=b;b.headerCt.view=b;b.grid.view=b;b.initFeatures(b.grid);delete b.grid;b.tpl=b.getTpl("tpl");b.itemSelector=b.getItemSelector();b.all=new Ext.view.NodeCache(b);b.callParent()},moveColumn:function(a,o,d){var n=this,l=(d>1)?document.createDocumentFragment():undefined,c=o,p=n.getGridColumns().length,h=p-1,b=(n.firstCls||n.lastCls)&&(o===0||o==p||a===0||a==h),g,e,s,k,m,r,q;if(n.rendered&&o!==a){s=n.el.query(n.getDataRowSelector());if(o>a&&l){c-=d}for(g=0,k=s.length;g<k;g++){m=s[g];r=m.childNodes;if(b){if(r.length===1){Ext.fly(r[0]).addCls(n.firstCls);Ext.fly(r[0]).addCls(n.lastCls);continue}if(a===0){Ext.fly(r[0]).removeCls(n.firstCls);Ext.fly(r[1]).addCls(n.firstCls)}else{if(a===h){Ext.fly(r[h]).removeCls(n.lastCls);Ext.fly(r[h-1]).addCls(n.lastCls)}}if(o===0){Ext.fly(r[0]).removeCls(n.firstCls);Ext.fly(r[a]).addCls(n.firstCls)}else{if(o===p){Ext.fly(r[h]).removeCls(n.lastCls);Ext.fly(r[a]).addCls(n.lastCls)}}}if(l){for(e=0;e<d;e++){l.appendChild(r[a])}m.insertBefore(l,r[c]||null)}else{m.insertBefore(r[a],r[c]||null)}}q=n.el.query(n.getBodySelector());for(g=0,k=q.length;g<k;g++){m=q[g];if(l){for(e=0;e<d;e++){l.appendChild(m.childNodes[a])}m.insertBefore(l,m.childNodes[c]||null)}else{m.insertBefore(m.childNodes[a],m.childNodes[c]||null)}}}},scrollToTop:Ext.emptyFn,addElListener:function(a,c,b){this.mon(this,a,c,b,{element:"el"})},getGridColumns:function(){return this.headerCt.getGridColumns()},getHeaderAtIndex:function(a){return this.headerCt.getHeaderAtIndex(a)},getCell:function(a,b){var c=this.getNode(a,true);return Ext.fly(c).down(b.getCellSelector())},getFeature:function(b){var a=this.featuresMC;if(a){return a.get(b)}},findFeature:function(a){if(this.features){return Ext.Array.findBy(this.features,function(b){if(b.ftype===a){return true}})}},initFeatures:function(d){var g=this,c,e,b,a;g.tableTpl=Ext.XTemplate.getTpl(this,"tableTpl");g.rowTpl=Ext.XTemplate.getTpl(this,"rowTpl");g.cellTpl=Ext.XTemplate.getTpl(this,"cellTpl");g.featuresMC=new Ext.util.MixedCollection();e=g.features=g.constructFeatures();a=e?e.length:0;for(c=0;c<a;c++){b=e[c];b.view=g;b.grid=d;g.featuresMC.add(b);b.init(d)}},renderTHead:function(b,c){var e=b.view.headerFns,a,d;if(e){for(d=0,a=e.length;d<a;++d){e[d].call(this,b,c)}}},addHeaderFn:function(){var a=this.headerFns;if(!a){a=this.headerFns=[]}a.push(fn)},renderTFoot:function(b,c){var e=b.view.footerFns,a,d;if(e){for(d=0,a=e.length;d<a;++d){e[d].call(this,b,c)}}},addFooterFn:function(a){var b=this.footerFns;if(!b){b=this.footerFns=[]}b.push(a)},addTableTpl:function(a){return this.addTpl("tableTpl",a)},addRowTpl:function(a){return this.addTpl("rowTpl",a)},addCellTpl:function(a){return this.addTpl("cellTpl",a)},addTpl:function(e,d){var c=this,a,b;d=Ext.Object.chain(d);if(!d.isTemplate){d.applyOut=c.tplApplyOut}for(a=c[e];d.priority<a.priority;a=a.nextTpl){b=a}if(b){b.nextTpl=d}else{c[e]=d}d.nextTpl=a;return d},tplApplyOut:function(a,b){if(this.before){if(this.before(a,b)===false){return}}this.nextTpl.applyOut(a,b);if(this.after){this.after(a,b)}},constructFeatures:function(){var g=this,e=g.features,d,b,c=0,a;if(e){b=[];a=e.length;for(;c<a;c++){d=e[c];if(!d.isFeature){d=Ext.create("feature."+d.ftype,d)}b[c]=d}}return b},beforeRender:function(){var a=this;a.callParent();if(!a.enableTextSelection){a.protoEl.unselectable()}},onViewScroll:function(b,a){this.callParent(arguments);this.fireEvent("bodyscroll",b,a)},createRowElement:function(a,b){var c=this,d=c.renderBuffer;c.tpl.overwrite(d,c.collectData([a],b));return Ext.fly(d).down(c.getNodeContainerSelector(),true).firstChild},bufferRender:function(a,b){var c=this,d=c.renderBuffer;c.tpl.overwrite(d,c.collectData(a,b));return Ext.Array.toArray(Ext.fly(d).down(c.getNodeContainerSelector(),true).childNodes)},collectData:function(a,b){this.rowValues.view=this;return{view:this,rows:a,viewStartIndex:b,tableStyle:this.bufferedRenderer?("position:absolute;top:"+this.bufferedRenderer.bodyTop):""}},collectNodes:function(a){this.all.fill(this.getNodeContainer().childNodes,this.all.startIndex)},refreshSize:function(){var c=this,b,a=c.getBodySelector();if(a){c.body.attach(c.el.child(a,true))}if(!c.hasLoadingHeight){b=c.up("tablepanel");Ext.suspendLayouts();c.callParent();b.updateLayout();Ext.resumeLayouts(true)}},statics:{getBoundView:function(a){return Ext.getCmp(a.getAttribute("data-boundView"))}},getRecord:function(b){b=this.getNode(b);if(b){var a=b.getAttribute("data-recordIndex");if(a){a=parseInt(a,10);if(a>-1){return this.store.data.getAt(a)}}return this.dataSource.data.get(b.getAttribute("data-recordId"))}},indexOf:function(a){a=this.getNode(a,false);if(!a&&a!==0){return -1}return this.all.indexOf(a)},indexInStore:function(b){b=this.getNode(b,true);if(!b&&b!==0){return -1}var a=b.getAttribute("data-recordIndex");if(a){return parseInt(a,10)}return this.dataSource.indexOf(this.getRecord(b))},renderRows:function(e,d,b){var g=this.rowValues,a=e.length,h=this.getHeaderCt(),c;g.view=this;g.columns=h.getGridColumns();g.visibleColumns=h.getVisibleGridColumns();for(c=0;c<a;c++,d++){g.itemClasses.length=g.rowClasses.length=0;this.renderRow(e[c],d,b)}g.view=g.columns=g.visibleColumns=g.record=null},renderColumnSizer:function(b){var d=this.getGridColumns(),a=d.length,c,g,e;for(c=0;c<a;c++){g=d[c];e=g.hidden?0:(g.lastBox?g.lastBox.width:Ext.grid.header.Container.prototype.defaultWidth);b.push('<colgroup><col class="',Ext.baseCSSPrefix,"grid-cell-",d[c].getItemId(),'" style="width:'+e+'px"></colgroup>')}},renderRow:function(g,a,e){var i=this,d=a===-1,h=i.selModel,l=i.rowValues,c=l.itemClasses,b=l.rowClasses,k,j=i.rowTpl;l.record=g;l.recordId=g.internalId;l.recordIndex=a;l.rowId=i.getRowId(g);l.itemCls=l.rowCls="";if(!l.columns){l.columns=i.headerCt.getGridColumns()}c.length=b.length=0;if(!d){c[0]=Ext.baseCSSPrefix+"grid-row";if(h&&h.isRowSelected&&h.isRowSelected(g,a)){c.push(i.selectedItemCls)}if(i.stripeRows&&a%2!==0){b.push(i.altRowCls)}if(i.getRowClass){k=i.getRowClass(g,a,null,i.dataSource);if(k){b.push(k)}}}if(e){j.applyOut(l,e)}else{return j.apply(l)}},renderCell:function(c,g,e,i,d){var k=this,h=k.selModel,j=k.cellValues,b=j.classes,a=g.data[c.dataIndex],m=k.cellTpl,n,l;j.record=g;j.column=c;j.recordIndex=e;j.columnIndex=i;j.cellIndex=i;j.align=c.align;j.tdCls=c.tdCls;j.style=j.tdAttr="";j.unselectableAttr=k.enableTextSelection?"":'unselectable="on"';if(c.renderer&&c.renderer.call){n=c.renderer.call(c.scope||k.ownerCt,a,j,g,e,i,k.dataSource,k);if(j.css){g.cssWarning=true;j.tdCls+=" "+j.css;delete j.css}}else{n=a}j.value=(n==null||n==="")?"&#160;":n;b[1]=Ext.baseCSSPrefix+"grid-cell-"+c.getItemId();l=2;if(c.tdCls){b[l++]=c.tdCls}if(k.markDirty&&g.isModified(c.dataIndex)){b[l++]=k.dirtyCls}if(c.isFirstVisible){b[l++]=k.firstCls}if(c.isLastVisible){b[l++]=k.lastCls}if(!k.enableTextSelection){b[l++]=Ext.baseCSSPrefix+"unselectable"}b[l++]=j.tdCls;if(h&&h.isCellSelected&&h.isCellSelected(k,e,i)){b[l++]=(k.selectedCellCls)}b.length=l;j.tdCls=b.join(" ");m.applyOut(j,d);j.column=null},getNode:function(c,b){var d,a=this.callParent(arguments);if(a&&a.tagName){if(b){if(!(d=Ext.fly(a)).is(this.dataRowSelector)){return d.down(this.dataRowSelector,true)}}else{if(b===false){if(!(d=Ext.fly(a)).is(this.itemSelector)){return d.up(this.itemSelector,null,true)}}}}return a},getRowId:function(a){return this.id+"-record-"+a.internalId},constructRowId:function(a){return this.id+"-record-"+a},getNodeById:function(b,a){b=this.constructRowId(b);return this.retrieveNode(b,a)},getNodeByRecord:function(a,b){var c=this.getRowId(a);return this.retrieveNode(c,b)},retrieveNode:function(e,c){var a=this.el.getById(e,true),b=this.itemSelector,d;if(c===false&&a){if(!(d=Ext.fly(a)).is(b)){return d.up(b,null,true)}}return a},updateIndexes:Ext.emptyFn,bodySelector:"table",nodeContainerSelector:"tbody",itemSelector:"tr."+Ext.baseCSSPrefix+"grid-row",dataRowSelector:"tr."+Ext.baseCSSPrefix+"grid-data-row",cellSelector:"td."+Ext.baseCSSPrefix+"grid-cell",sizerSelector:"col."+Ext.baseCSSPrefix+"grid-cell",innerSelector:"div."+Ext.baseCSSPrefix+"grid-cell-inner",getNodeContainer:function(){return this.el.down(this.nodeContainerSelector,true)},getBodySelector:function(){return this.bodySelector+"."+Ext.baseCSSPrefix+this.id+"-table"},getNodeContainerSelector:function(){return this.nodeContainerSelector},getColumnSizerSelector:function(a){return this.sizerSelector+"-"+a.getItemId()},getItemSelector:function(){return this.itemSelector},getDataRowSelector:function(){return this.dataRowSelector},getCellSelector:function(b){var a=this.cellSelector;if(b){a+="-"+b.getItemId()}return a},getCellInnerSelector:function(a){return this.getCellSelector(a)+" "+this.innerSelector},addRowCls:function(b,a){var c=this.getNode(b,false);if(c){Ext.fly(c).addCls(a)}},removeRowCls:function(b,a){var c=this.getNode(b,false);if(c){Ext.fly(c).removeCls(a)}},onRowSelect:function(a){this.addRowCls(a,this.selectedItemCls)},onRowDeselect:function(b){var a=this;a.removeRowCls(b,a.selectedItemCls);a.removeRowCls(b,a.focusedItemCls)},onCellSelect:function(b){var a=this.getCellByPosition(b,true);if(a){Ext.fly(a).addCls(this.selectedCellCls)}},onCellDeselect:function(b){var a=this.getCellByPosition(b,true);if(a){Ext.fly(a).removeCls(this.selectedCellCls)}},onCellFocus:function(a){this.focusCell(a)},getCellByPosition:function(a,b){if(a){var c=this.getNode(a.row,true),d=this.headerCt.getHeaderAtIndex(a.column);if(d&&c){return Ext.fly(c).down(this.getCellSelector(d),b)}}return false},focus:function(){var a=this.getFocusEl();if(a){this.focusRow(a)}},getFocusEl:function(){var b=this,a;if(b.refreshCounter){a=b.focusedRow;if(!(a&&b.el.contains(a))){if(b.all.getCount()){b.focusRow(b.getFirstVisibleRowIndex());a=b.focusedRow}else{a=b.body}}}else{return b.el}return Ext.get(a)},onRowFocus:function(d,b,a){var c=this;if(b){c.addRowCls(d,c.focusedItemCls);if(!a){c.focusRow(d)}}else{c.removeRowCls(d,c.focusedItemCls)}},focusRow:function(c){var b=this,e,d=b.ownerCt&&b.ownerCt.collapsed,a;if(b.isVisible(true)&&!d&&(e=b.getNode(c,true))&&b.el){a=b.getRecord(e);c=b.indexInStore(e);b.selModel.setLastFocused(a);e.focus();b.focusedRow=e;b.fireEvent("rowfocus",a,e,c)}},focusCell:function(g){var i=this,j=i.getCellByPosition(g),e=i.getRecord(g.row),b=i.el,d=0,c=b.getRegion(),a=i.ownerCt,h;this.focusRow(e);if(j){c.right=c.left+b.dom.clientWidth;h=j.getRegion();if(h.left<c.left){d=h.left-c.left}else{if(h.right>c.right){d=h.right-c.right}}if(d){a.scrollByDeltaX(d)}i.fireEvent("cellfocus",e,j,g)}},scrollByDelta:function(c,b){b=b||"scrollTop";var a=this.el.dom;a[b]=(a[b]+=c)},isDataRow:function(a){return Ext.fly(a).hasCls(Ext.baseCSSPrefix+"grid-data-row")},syncRowHeights:function(g,a){g=Ext.get(g);a=Ext.get(a);g.dom.style.height=a.dom.style.height="";var d=this,e=d.rowTpl,b=g.dom.offsetHeight,c=a.dom.offsetHeight;if(b!==c){while(e){if(e.syncRowHeights){if(e.syncRowHeights(g,a)===false){break}}e=e.nextTpl}b=g.dom.offsetHeight;c=a.dom.offsetHeight;if(b!==c){g=g.down("[data-recordId]")||g;a=a.down("[data-recordId]")||a;if(g&&a){g.dom.style.height=a.dom.style.height="";b=g.dom.offsetHeight;c=a.dom.offsetHeight;if(b>c){g.setHeight(b);a.setHeight(b)}else{if(c>b){g.setHeight(c);a.setHeight(c)}}}}}},onIdChanged:function(a,h,g,c,b){var e=this,d;if(e.viewReady){d=e.getNodeById(b);if(d){d.setAttribute("data-recordId",h.internalId);d.id=e.getRowId(h)}}},onUpdate:function(q,g,e,n){var m=this,r=m.rowTpl,i,k,l,p,b,a,h,c,j,o,d;if(m.viewReady){l=m.getNodeByRecord(g,false);if(l){j=m.overItemCls;o=m.focusedItemCls;i=m.indexInStore(g);k=Ext.fly(l,"_internal");p=m.createRowElement(g,i);if(k.hasCls(j)){Ext.fly(p).addCls(j)}if(k.hasCls(o)){Ext.fly(p).addCls(o)}d=m.headerCt.getGridColumns();if(l.mergeAttributes){l.mergeAttributes(p,true)}else{b=p.attributes;a=b.length;for(c=0;c<a;c++){h=b[c].name;if(h!=="id"){l.setAttribute(h,b[c].value)}}}if(d.length){m.updateColumns(g,m.getNode(l,true),m.getNode(p,true),d,n)}while(r){if(r.syncContent){if(r.syncContent(l,p)===false){break}}r=r.nextTpl}m.fireEvent("itemupdate",g,i,l);m.refreshSize()}}},updateColumns:function(d,c,i,b,p){var t=this,j,q,r,g,l=b.length,m,e,a,k,h,o=t.editingPlugin||(t.lockingPartner&&t.ownerCt.ownerLockable.view.editingPlugin),n=o&&o.editing,s=t.getCellSelector();if(c.mergeAttributes){c.mergeAttributes(i,true)}else{j=i.attributes;q=j.length;for(g=0;g<q;g++){r=j[g].name;if(r!=="id"){c.setAttribute(r,j[g].value)}}}for(m=0;m<l;m++){e=b[m];if(t.shouldUpdateCell(d,e,p)){s=t.getCellSelector(e);a=Ext.DomQuery.selectNode(s,c);k=Ext.DomQuery.selectNode(s,i);if(n){Ext.fly(a).syncContent(k)}else{h=a.parentNode;h.insertBefore(k,a);h.removeChild(a)}}}},shouldUpdateCell:function(b,e,d){if(e.hasCustomRenderer||!d){return true}if(d){var a=d.length,c,g;for(c=0;c<a;++c){g=d[c];if(g===e.dataIndex||g===b.idProperty){return true}}}return false},refresh:function(){var a=this;a.callParent(arguments);a.headerCt.setSortState();a.selModel.onLastFocusChanged(null,a.selModel.lastFocused)},processItemEvent:function(d,r,n,j){if(this.indexInStore(r)!==-1){var l=this,o=j.getTarget(l.getCellSelector(),r),m,a=l.statics().EventMap,g=l.getSelectionModel(),k=j.type,b=l.features,h=b.length,c,q,p;if(k=="keydown"&&!o&&g.getCurrentPosition){o=l.getCellByPosition(g.getCurrentPosition(),true)}if(o){if(!o.parentNode){return false}m=o.cellIndex;if(!(m||m===0)){m=Number(o.getAttribute("data-cellIndex"))}}else{m=-1}q=l.fireEvent("uievent",k,l,o,n,m,j,d,r);if(q===false||l.callParent(arguments)===false){return false}for(c=0;c<h;++c){p=b[c];if(p.wrapsItem){if(p.vetoEvent(d,r,n,j)===false){l.processSpecialEvent(j);return false}}}if(k=="mouseover"||k=="mouseout"){return true}if(!o){return true}return !((l["onBeforeCell"+a[k]](o,m,d,r,n,j)===false)||(l.fireEvent("beforecell"+k,l,o,m,d,r,n,j)===false)||(l["onCell"+a[k]](o,m,d,r,n,j)===false)||(l.fireEvent("cell"+k,l,o,m,d,r,n,j)===false))}else{this.processSpecialEvent(j);return false}},processSpecialEvent:function(j){var m=this,c=m.features,l=c.length,n=j.type,d,o,g,h,b,k,a=m.ownerCt;m.callParent(arguments);if(n=="mouseover"||n=="mouseout"){return}for(d=0;d<l;d++){o=c[d];if(o.hasFeatureEvent){h=j.getTarget(o.eventSelector,m.getTargetEl());if(h){g=o.eventPrefix;b=o.getFireEventArgs("before"+g+n,m,h,j);k=o.getFireEventArgs(g+n,m,h,j);if((m.fireEvent.apply(m,b)===false)||(a.fireEvent.apply(a,b)===false)||(m.fireEvent.apply(m,k)===false)||(a.fireEvent.apply(a,k)===false)){return false}}}}return true},onCellMouseDown:Ext.emptyFn,onCellMouseUp:Ext.emptyFn,onCellClick:Ext.emptyFn,onCellDblClick:Ext.emptyFn,onCellContextMenu:Ext.emptyFn,onCellKeyDown:Ext.emptyFn,onBeforeCellMouseDown:Ext.emptyFn,onBeforeCellMouseUp:Ext.emptyFn,onBeforeCellClick:Ext.emptyFn,onBeforeCellDblClick:Ext.emptyFn,onBeforeCellContextMenu:Ext.emptyFn,onBeforeCellKeyDown:Ext.emptyFn,expandToFit:function(a){this.autoSizeColumn(a)},autoSizeColumn:function(a){if(Ext.isNumber(a)){a=this.getGridColumns[a]}if(a){if(a.isGroupHeader){a.autoSize();return}delete a.flex;a.setWidth(this.getMaxContentWidth(a))}},getMaxContentWidth:function(h){var e=this,a=e.el.query(h.getCellInnerSelector()),g=h.getWidth(),b=0,d=a.length,c;e.body.select(e.getColumnSizerSelector(h)).setWidth(40);c=h.textEl.dom.offsetWidth+h.titleEl.getPadding("lr");for(;b<d;b++){c=Math.max(c,a[b].scrollWidth+2)}e.body.select(e.getColumnSizerSelector(h)).setWidth(g);return c},getPositionByEvent:function(g){var d=this,b=g.getTarget(d.cellSelector),c=g.getTarget(d.itemSelector),a=d.getRecord(c),h=d.getHeaderByCell(b);return d.getPosition(a,h)},getHeaderByCell:function(b){if(b){var a=b.className.match(this.cellRe);if(a&&a[1]){return Ext.getCmp(a[1])}}return false},walkCells:function(l,m,h,n,a,o){if(!l){return false}var j=this,p=l.row,d=l.column,k=j.dataSource.getCount(),g=j.getFirstVisibleColumnIndex(),b=j.getLastVisibleColumnIndex(),i={row:p,column:d},c=j.headerCt.getHeaderAtIndex(d);if(!c||c.hidden||!k){return false}h=h||{};m=m.toLowerCase();switch(m){case"right":if(d===b){if(n||p===k-1){return false}if(!h.ctrlKey){i.row=j.walkRows(p,1);if(i.row!==p){i.column=g}}}else{if(!h.ctrlKey){i.column=d+j.getRightGap(c)}else{i.column=b}}break;case"left":if(d===g){if(n||p===0){return false}if(!h.ctrlKey){i.row=j.walkRows(p,-1);if(i.row!==p){i.column=b}}}else{if(!h.ctrlKey){i.column=d+j.getLeftGap(c)}else{i.column=g}}break;case"up":if(p===0){return false}else{if(!h.ctrlKey){i.row=j.walkRows(p,-1)}else{i.row=j.walkRows(-1,1)}}break;case"down":if(p===k-1){return false}else{if(!h.ctrlKey){i.row=j.walkRows(p,1)}else{i.row=j.walkRows(k,-1)}}break}if(a&&a.call(o||window,i)!==true){return false}else{return i}},walkRows:function(i,a){var d=this,e=0,k=i,b,h=(d.dataSource.buffered?d.dataSource.getTotalCount():d.dataSource.getCount())-1,c=(a<0)?0:h,g=c?1:-1,j=i;do{if(c?j>=c:j<=0){return k||c}j+=g;if((b=Ext.fly(d.getNode(j,true)))&&b.isVisible(true)){e+=g;k=j}}while(e!==a);return j},walkRecs:function(b,a){var h=this,i=0,l=b,c,k=(h.store.buffered?h.store.getTotalCount():h.store.getCount())-1,e=(a<0)?0:k,j=e?1:-1,g=h.store.indexOf(b),d;do{if(e?g>=e:g<=0){return l}g+=j;d=h.store.getAt(g);if((c=Ext.fly(h.getNodeByRecord(d,true)))&&c.isVisible(true)){i+=j;l=d}}while(i!==a);return l},getFirstVisibleRowIndex:function(){var c=this,b=(c.dataSource.buffered?c.dataSource.getTotalCount():c.dataSource.getCount()),a=c.indexOf(c.all.first())-1;do{a+=1;if(a===b){return}}while(!Ext.fly(c.getNode(a,true)).isVisible(true));return a},getLastVisibleRowIndex:function(){var b=this,a=b.indexOf(b.all.last());do{a-=1;if(a===-1){return}}while(!Ext.fly(b.getNode(a,true)).isVisible(true));return a},getFirstVisibleColumnIndex:function(){var a=this.getHeaderCt().getVisibleGridColumns()[0];return a?a.getIndex():-1},getLastVisibleColumnIndex:function(){var b=this.getHeaderCt().getVisibleGridColumns(),a=b[b.length-1];return a.getIndex()},getHeaderCt:function(){return this.headerCt},getPosition:function(a,b){return{row:this.dataSource.indexOf(a,true),column:Ext.Array.indexOf(this.headerCt.getGridColumns(),b)}},getRightGap:function(a){var g=this.getHeaderCt(),e=g.getGridColumns(),b=Ext.Array.indexOf(e,a),c=b+1,d;for(;c<=e.length;c++){if(!e[c].hidden){d=c;break}}return d-b},beforeDestroy:function(){var a=this;if(a.rendered){a.el.removeAllListeners()}a.callParent(arguments)},onDestroy:function(){var d=this,c=d.featuresMC,a,b;if(c){for(b=0,a=c.getCount();b<a;++b){c.getAt(b).destroy()}}d.featuresMC=null;this.callParent(arguments)},getLeftGap:function(a){var g=this.getHeaderCt(),e=g.getGridColumns(),c=Ext.Array.indexOf(e,a),d=c-1,b;for(;d>=0;d--){if(!e[d].hidden){b=d;break}}return b-c},onAdd:function(c,a,b){this.callParent(arguments);this.doStripeRows(b)},onRemove:function(c,a,b){this.callParent(arguments);this.doStripeRows(b[0])},doStripeRows:function(b,a){var d=this,e,h,c,g;if(d.rendered&&d.stripeRows){e=d.getNodes(b,a);for(c=0,h=e.length;c<h;c++){g=e[c];g.className=g.className.replace(d.rowClsRe," ");b++;if(b%2===0){g.className+=(" "+d.altRowCls)}}}}});Ext.define("Ext.grid.View",{extend:Ext.view.Table,alias:"widget.gridview",stripeRows:true,autoScroll:true});Ext.define("Ext.grid.Panel",{extend:Ext.panel.Table,alias:["widget.gridpanel","widget.grid"],alternateClassName:["Ext.list.ListView","Ext.ListView","Ext.grid.GridPanel"],viewType:"gridview",lockable:false,rowLines:true});Ext.define("Ext.grid.plugin.BufferedRendererTableView",{override:"Ext.view.Table",onAdd:function(b,a,c){var e=this.bufferedRenderer,d=this.all;if(e&&(d.getCount()+a.length)>e.viewSize){if(c<d.startIndex+e.viewSize&&(c+a.length)>d.startIndex){this.onDataRefresh()}else{e.stretchView(this,e.getScrollHeight())}}else{this.callParent([b,a,c])}},onRemove:function(b,a,c){if(this.bufferedRenderer){this.onDataRefresh()}else{this.callParent([b,a,c])}}});Ext.define("Ext.grid.RowEditorButtons",{extend:Ext.container.Container,alias:"widget.roweditorbuttons",frame:true,constructor:function(b){var a=b.rowEditor,d=Ext.baseCSSPrefix,c=a.editingPlugin;b=Ext.apply({floating:{shadow:false},baseCls:d+"grid-row-editor-buttons",layout:{type:"hbox",align:"middle"},defaults:{xtype:"button",ui:a.buttonUI,scope:c,flex:1,minWidth:Ext.panel.Panel.prototype.minButtonWidth},items:[{cls:d+"row-editor-update-button",itemId:"update",handler:c.completeEdit,text:a.saveBtnText,disabled:a.updateButtonDisabled},{cls:d+"row-editor-cancel-button",handler:c.cancelEdit,text:a.cancelBtnText}]},b);this.callParent([b])},getTargetEl:function(){return this.el},afterComponentLayout:function(){if(Ext.isIEQuirks&&!this.componentLayoutCounter){this.el.setWidth(this.width=this.layout.innerCt.getWidth()+this.getFrameInfo().width)}this.callParent(arguments)}});Ext.define("Ext.grid.RowEditor",{extend:Ext.form.Panel,alias:"widget.roweditor",saveBtnText:"Update",cancelBtnText:"Cancel",errorsText:"Errors",dirtyText:"You need to commit or cancel your changes",lastScrollLeft:0,lastScrollTop:0,border:false,buttonUI:"default",hideMode:"offsets",initComponent:function(){var b=this,a;b.cls=Ext.baseCSSPrefix+"grid-editor "+Ext.baseCSSPrefix+"grid-row-editor";b.layout={type:"hbox",align:"middle"};b.columns=new Ext.util.HashMap();b.columns.getKey=function(d){var c;if(d.getEditor){c=d.getEditor();if(c){return c.id}}return d.id};b.mon(b.columns,{add:b.doColumnAdd,remove:b.doColumnRemove,replace:b.onColumnReplace,scope:b});b.callParent(arguments);if(b.fields){b.setField(b.fields,true);delete b.fields}b.mon(b.hierarchyEventSource,{scope:b,show:b.repositionIfVisible});b.mon(b.view.headerCt,"afterlayout",b.correctWidth,b);a=b.getForm();a.trackResetOnLoad=true},onFieldRender:function(e){var c=this,d=c.getEditorMargins(e),b=c.columns.get(e.id),a;e.setMargin("0 "+d.right+" 0 "+d.left,true);if(b.isVisible()){c.setFieldWidth(b,e)}else{if(!b.rendered){a=Ext.Function.bind(c.setFieldWidth,c,[b,e]);c.mon(c.view.headerCt,"afterlayout",a,c,{single:true})}}},setFieldWidth:function(a,c){var b=this.getEditorMargins(c);c.setWidth(a.getWidth()-b.width)},setupMargin:function(h){var e=this,c=e.cellPadding,g=e.view,a=0,k=0,b=1,j,d,i;if(!c){i=g.el.down(g.cellSelector+" "+g.innerSelector);if(i){c={left:i.getPadding("l"),right:i.getPadding("r"),top:i.getPadding("t"),bottom:i.getPadding("b")}}else{c={left:0,right:0}}e.cellPadding=c}j=h.inputEl;if(j){a=j.getPadding("l");k=j.getPadding("r")}if(h.isXType("textfield")){b=1}d={left:Math.max(1,c.left-(a+b)),right:Math.max(1,c.right-(k+b)),top:c.top,bottom:c.bottom};d.width=d.left+d.right;h.editorMargin=d;return d},getEditorMargins:function(b){var a=b.editorMargin;if(!a){a=this.setupMargin(b)}return a},onFieldChange:function(){var c=this,b=c.getForm(),a=b.isValid();if(c.errorSummary&&c.isVisible()){c[a?"hideToolTip":"showToolTip"]()}c.updateButton(a);c.isValid=a},updateButton:function(b){var a=this.floatingButtons;if(a){a.child("#update").setDisabled(!b)}else{this.updateButtonDisabled=!b}},afterRender:function(){var c=this,b=c.editingPlugin,a=b.grid,e,d;c.callParent(arguments);c.mon(c.container,"scroll",c.onCtScroll,c,{buffer:10});if(a.lockable){a.normalGrid.view.mon(a.normalGrid.view.el,"scroll",c.onNormalViewScroll,c,{buffer:10})}c.mon(c.el,{click:Ext.emptyFn,stopPropagation:true});c.el.swallowEvent(["keypress","keydown"]);c.keyNav=new Ext.util.KeyNav(c.el,{enter:b.completeEdit,esc:b.onEscKey,scope:b});c.mon(b.view,{beforerefresh:c.onBeforeViewRefresh,refresh:c.onViewRefresh,itemremove:c.onViewItemRemove,scope:c});c.preventReposition=true;c.columns.each(function(g,h){e=h.getEditor();d=c.getEditorMargins(e);h.getEditor().setMargin("0 "+d.right+" 0 "+d.left,true);if(h.isVisible()){c.onColumnShow(h)}},c);delete c.preventReposition},onBeforeViewRefresh:function(b){var c=this,a=b.el.dom;if(c.el.dom.parentNode===a){a.removeChild(c.el.dom)}},onViewRefresh:function(b){var d=this,c=d.context,a;d.container.dom.appendChild(d.el.dom);if(c&&(a=c.store.indexOf(c.record))>=0){c.row=b.getNode(a);d.reposition();if(d.tooltip&&d.tooltip.isVisible()){d.tooltip.setTarget(c.row)}}else{d.editingPlugin.cancelEdit()}},onViewItemRemove:function(a,b){var c=this.context;if(c&&a===c.record){this.editingPlugin.cancelEdit()}},onCtScroll:function(d,c){var a=this,b=c.scrollTop,g=Ext.fly(c).getScrollLeft();if(b!==a.lastScrollTop){a.lastScrollTop=b;if((a.tooltip&&a.tooltip.isVisible())||a.hiddenTip){a.repositionTip()}}if(g!==a.lastScrollLeft){a.lastScrollLeft=g;a.reposition()}},onNormalViewScroll:function(d,c){if(this.ignoreScroll){this.ignoreScroll=false;return}var a=this,b=c.scrollTop;if(b!==a.lastScrollTop){a.lastScrollTop=b;if((a.tooltip&&a.tooltip.isVisible())||a.hiddenTip){a.repositionTip()}}this.reposition(null,true)},onColumnResize:function(b,a){var c;if(!b.isGroupHeader&&this.rendered){c=b.getEditor();c.setWidth(a-this.getEditorMargins(c).width);this.repositionIfVisible()}},onColumnHide:function(a){if(!a.isGroupHeader){a.getEditor().hide();this.repositionIfVisible()}},onColumnShow:function(a){var b=this,c;if(!a.isGroupHeader){c=a.getEditor();c.show();if(b.rendered){c.setWidth(a.getWidth()-b.getEditorMargins(c).width);if(!b.preventReposition){this.repositionIfVisible()}}}},onColumnMove:function(c,b,d){var a=this.editingPlugin.grid,g;if(a.lockable&&a.normalGrid.headerCt.contains(c,true)){g=a.lockedGrid.view.getGridColumns().length;b+=g;d+=g}if(!c.isGroupHeader){var e=c.getEditor();if(this.items.indexOf(e)!=d){this.move(b,d)}}},onColumnAdd:function(a){this.doColumnAdd(this.columns,a.getEditor().id,a);if(!a.isGroupHeader){this.setField(a)}},doColumnAdd:function(e,a,b){var c=this,g,d;if(!b.isGroupHeader){g=c.editingPlugin.grid.headerCt.getHeaderIndex(b);d=b.getEditor({xtype:"displayfield"});c.insert(g,d)}},onColumnRemove:function(a){this.doColumnRemove(this.columns,a.getEditor().id,a);this.columns.remove(a)},doColumnRemove:function(e,a,b){var c=this,d;if(!b.isGroupHeader){d=b.getEditor();c.remove(d,false)}},onColumnReplace:function(d,a,c,b){this.onColumnRemove(d,a,b)},clearFields:function(){var b=this.columns,a;for(a in b){if(b.hasOwnProperty(a)){b.removeAtKey(a)}}},getFloatingButtons:function(){var a=this;if(!a.floatingButtons){a.floatingButtons=new Ext.grid.RowEditorButtons({rowEditor:a,renderTo:a.el})}return a.floatingButtons},repositionIfVisible:function(d){var b=this,a=b.view;if(d&&(d==b||!d.el.isAncestor(a.el))){return}if(b.isVisible()&&a.isVisible(true)){b.reposition()}},getRefOwner:function(){return this.editingPlugin.grid},reposition:function(r,m){var s=this,d=s.context,g=d&&Ext.get(d.row),p=s.getFloatingButtons(),q=p.el,b=s.editingPlugin.grid,h=b.lockable?b.normalGrid.view.el:b.view.el,o=b.headerCt.getFullWidth(),t=b.getWidth(),l=Math.min(o,t),n=Ext.fly(b.view.el.dom).getScrollLeft(),i=p.getWidth(),e=(l-i)/2+n,a=s.getLocalX(),j,k=function(){if(!m){if((j=(q.getRegion().bottom-b.el.getRegion().bottom))>0){if(b.lockable){b.normalGrid.view.body.dom.style.marginBottom=b.lockedGrid.view.body.dom.style.marginBottom=q.getHeight()+"px"}s.ignoreScroll=true;h.dom.scrollTop+=j;if(b.lockable){s.setLocalY(s.getLocalY()-j)}}}if(r&&r.callback){r.callback.call(r.scope||s)}},c;if(b.lockable){b.normalGrid.view.body.dom.style.marginBottom=b.lockedGrid.view.body.dom.style.marginBottom="";a+=b.normalGrid.view.el.dom.scrollLeft*(s.rtl?1:-1)}if(g&&Ext.isElement(g.dom)){if(!m){g.scrollIntoView(h,false)}s.setLocalX(a);if(r){c={to:{y:g.getXY()[1]-s.body.getBorderPadding().beforeY},duration:r.duration||125,listeners:{afteranimate:function(){s.setButtonPosition(q,e);k()}}};s.animate(c)}else{s.setLocalY((b.lockable?g.getOffsetsTo(b.body)[1]:g.dom.offsetTop)-s.body.getBorderPadding().beforeY);s.setButtonPosition(q,e);k()}}s.correctWidth()},correctWidth:function(){var a=this,b;if(a.rendered&&a.isVisible()&&a.el.dom.parentNode){b=a.editingPlugin.grid.headerCt.getFullWidth();if(a.getWidth()!=b){a.setWidth(b)}}},getLocalX:function(){return 0},setButtonPosition:function(a,b){a.setLocalXY(b,this.el.dom.offsetHeight-1)},getEditor:function(a){var b=this;if(Ext.isNumber(a)){return b.query(">[isFormField]")[a]}else{if(a.isHeader&&!a.isGroupHeader){return a.getEditor()}}},removeField:function(b){var a=this;b=a.getEditor(b);a.mun(b,"validitychange",a.onValidityChange,a);a.columns.removeAtKey(b.id);Ext.destroy(b)},setField:function(c,a){var e=this,b,d,g;if(Ext.isArray(c)){d=c.length;for(b=0;b<d;b++){e.setField(c[b],a)}return}g=c.getEditor(null,{xtype:"displayfield",getModelData:function(){return null}});e.mon(g,"change",e.onFieldChange,e);if(e.rendered){e.mon(g,"afterrender",e.onFieldRender,e,{single:true})}if(e.isVisible()&&e.context){if(g.is("displayfield")){e.renderColumnData(g,e.context.record,c)}else{g.suspendEvents();g.setValue(e.context.record.get(c.dataIndex));g.resumeEvents()}}e.columns.add(g.id,c);if(c.hidden){e.onColumnHide(c)}else{if(c.rendered&&!a){e.onColumnShow(c)}}},loadRecord:function(d){var j=this,a=j.getForm(),e=a.getFields(),h=e.items,b=h.length,c,g,k;for(c=0;c<b;c++){h[c].suspendEvents()}a.loadRecord(d);for(c=0;c<b;c++){h[c].resumeEvents()}k=a.isValid();if(j.errorSummary){if(k){j.hideToolTip()}else{j.showToolTip()}}j.updateButton(k);g=j.query(">displayfield");b=g.length;for(c=0;c<b;c++){j.renderColumnData(g[c],d)}},renderColumnData:function(m,i,c){var k=this,a=k.editingPlugin.grid,e=a.headerCt,l=a.view,o=l.store,g=c||k.columns.get(m.id),n=i.get(g.dataIndex),j=g.editRenderer||g.renderer,b,d,h;if(j){b={tdCls:"",style:""};d=o.indexOf(i);h=e.getHeaderIndex(g);n=j.call(g.scope||e.ownerCt,n,b,i,d,h,o,l)}m.setRawValue(n);m.resetOriginalValue()},beforeEdit:function(){var a=this;if(a.isVisible()&&a.errorSummary&&!a.autoCancel&&a.isDirty()){a.showToolTip();return false}},startEdit:function(b,h){var g=this,e=g.editingPlugin.grid,c=e.store,a=e.getView(),d=g.context=Ext.apply(g.editingPlugin.context,{view:a,store:c});if(!g.rendered){g.render(a.el)}d.grid.getSelectionModel().select(b);g.loadRecord(b);if(!g.isVisible()){g.show()}g.reposition({callback:this.focusContextCell})},focusContextCell:function(){var a=this.getEditor(this.context.colIdx);if(a&&a.focus){a.focus()}},cancelEdit:function(){var g=this,e=g.getForm(),a=e.getFields(),b=a.items,d=b.length,c;g.hide();e.clearInvalid();for(c=0;c<d;c++){b[c].suspendEvents()}e.reset();for(c=0;c<d;c++){b[c].resumeEvents()}},completeEdit:function(){var b=this,a=b.getForm();if(!a.isValid()){return}a.updateRecord(b.context.record);b.hide();return true},onShow:function(){this.callParent(arguments);this.reposition()},onHide:function(){var a=this;a.callParent(arguments);if(a.tooltip){a.hideToolTip()}if(a.context){a.context.view.focus();a.context=null}},isDirty:function(){var b=this,a=b.getForm();return a.isDirty()},getToolTip:function(){return this.tooltip||(this.tooltip=new Ext.tip.ToolTip({cls:Ext.baseCSSPrefix+"grid-row-editor-errors",title:this.errorsText,autoHide:false,closable:true,closeAction:"disable",anchor:"left",anchorToTarget:false}))},hideToolTip:function(){var a=this,b=a.getToolTip();if(b.rendered){b.disable()}a.hiddenTip=false},showToolTip:function(){var a=this,b=a.getToolTip();b.showAt([0,0]);b.update(a.getErrors());a.repositionTip();b.enable()},repositionTip:function(){var i=this,j=i.getToolTip(),c=i.context,l=Ext.get(c.row),k=c.grid.view.el,e=k.getHeight(),g=i.lastScrollTop,h=g+e,b=l.getHeight(),a=l.dom.offsetTop,d=a+b;if(d>g&&a<h){j.showAt(j.getAlignToXY(k,"tl-tr",[15,l.getOffsetsTo(k)[1]]));i.hiddenTip=false}else{j.hide();i.hiddenTip=true}},getErrors:function(){var d=this,e=!d.autoCancel&&d.isDirty()?d.dirtyText+"<br />":"",g=[],a=d.query(">[isFormField]"),c=a.length,b;for(b=0;b<c;b++){g=g.concat(Ext.Array.map(a[b].getErrors(),d.createListItem))}return e+'<ul class="'+Ext.plainListCls+'">'+g.join("")+"</ul>"},createListItem:function(a){return"<li>"+a+"</li>"},beforeDestroy:function(){Ext.destroy(this.floatingButtons,this.tooltip);this.callParent()}});Ext.define("Ext.grid.plugin.HeaderResizer",{extend:Ext.AbstractPlugin,alias:"plugin.gridheaderresizer",disabled:false,config:{dynamic:false},colHeaderCls:Ext.baseCSSPrefix+"column-header",minColWidth:40,maxColWidth:1000,wResizeCursor:"col-resize",eResizeCursor:"col-resize",init:function(a){this.headerCt=a;a.on("render",this.afterHeaderRender,this,{single:true})},destroy:function(){if(this.tracker){this.tracker.destroy()}},afterHeaderRender:function(){var b=this.headerCt,a=b.el;b.mon(a,"mousemove",this.onHeaderCtMouseMove,this);this.tracker=new Ext.dd.DragTracker({disabled:this.disabled,onBeforeStart:Ext.Function.bind(this.onBeforeStart,this),onStart:Ext.Function.bind(this.onStart,this),onDrag:Ext.Function.bind(this.onDrag,this),onEnd:Ext.Function.bind(this.onEnd,this),tolerance:3,autoStart:300,el:a})},onHeaderCtMouseMove:function(b,k){var d=this,a,i,j,g,c,h;if(d.headerCt.dragging){if(d.activeHd){d.activeHd.el.dom.style.cursor="";delete d.activeHd}}else{i=b.getTarget("."+d.colHeaderCls,3,true);if(i){j=Ext.getCmp(i.id);if(j.isOnLeftEdge(b)){g=j.previousNode("gridcolumn:not([hidden]):not([isGroupHeader])");if(g){h=d.headerCt.up("tablepanel");c=g.up("tablepanel");if(!((c===h)||((h.ownerCt.isXType("tablepanel"))&&h.ownerCt.view.lockedGrid===c))){g=null}}}else{if(j.isOnRightEdge(b)){g=j}else{g=null}}if(g){if(g.isGroupHeader){a=g.getGridColumns();g=a[a.length-1]}if(g&&!(g.fixed||(g.resizable===false)||d.disabled)){d.activeHd=g;j.el.dom.style.cursor=d.eResizeCursor;if(j.triggerEl){j.triggerEl.dom.style.cursor=d.eResizeCursor}}}else{j.el.dom.style.cursor="";if(j.triggerEl){j.triggerEl.dom.style.cursor=""}d.activeHd=null}}}},onBeforeStart:function(a){this.dragHd=this.activeHd;if(!!this.dragHd&&!this.headerCt.dragging){this.tracker.constrainTo=this.getConstrainRegion();return true}else{this.headerCt.dragging=false;return false}},getConstrainRegion:function(){var c=this,a=c.dragHd.el,b;if(c.headerCt.forceFit){b=c.dragHd.nextNode("gridcolumn:not([hidden]):not([isGroupHeader])");if(!c.headerInSameGrid(b)){b=null}}return c.adjustConstrainRegion(Ext.util.Region.getRegion(a),0,c.headerCt.forceFit?(b?b.getWidth()-c.minColWidth:0):c.maxColWidth-a.getWidth(),0,c.minColWidth)},onStart:function(h){var i=this,g=i.dragHd,b=g.el.getWidth(),d=g.getOwnerHeaderCt(),l,k,m,c,a,j,n;i.headerCt.dragging=true;i.origWidth=b;if(!i.dynamic){m=c=d.up("tablepanel");if(m.ownerLockable){c=m.ownerLockable}l=i.getLeftMarkerX(c);a=c.getLhsMarker();j=c.getRhsMarker();n=m.body.getHeight()+d.getHeight();k=d.getOffsetsTo(c)[1];a.setLocalY(k);j.setLocalY(k);a.setHeight(n);j.setHeight(n);i.setMarkerX(a,l);i.setMarkerX(j,l+b)}},onDrag:function(b){var a=this,c;if(a.dynamic){a.doResize()}else{c=this.headerCt.up("tablepanel");if(c.ownerLockable){c=c.ownerLockable}this.setMarkerX(this.getMovingMarker(c),this.calculateDragX(c))}},getMovingMarker:function(a){return a.getRhsMarker()},onEnd:function(a){this.headerCt.dragging=false;if(this.dragHd){if(!this.dynamic){var b=this.headerCt.up("tablepanel");if(b.ownerLockable){b=b.ownerLockable}this.setMarkerX(b.getLhsMarker(),-9999);this.setMarkerX(b.getRhsMarker(),-9999)}this.doResize()}},doResize:function(){var c=this,b=c.dragHd,a,d;if(b){d=c.tracker.getOffset("point");if(b.flex){delete b.flex}Ext.suspendLayouts();c.adjustColumnWidth(d[0]);if(c.headerCt.forceFit){a=b.nextNode("gridcolumn:not([hidden]):not([isGroupHeader])");if(!c.headerInSameGrid(a)){a=null}if(a){delete a.flex;a.setWidth(a.getWidth()-d[0])}}Ext.resumeLayouts(true)}},headerInSameGrid:function(b){var a=this.dragHd.up("tablepanel");return !!b.up(a)},disable:function(){this.disabled=true;if(this.tracker){this.tracker.disable()}},enable:function(){this.disabled=false;if(this.tracker){this.tracker.enable()}},calculateDragX:function(a){return this.tracker.getXY("point")[0]-a.getX()-a.el.getBorderWidth("l")},getLeftMarkerX:function(a){return this.dragHd.getX()-a.getX()-a.el.getBorderWidth("l")-1},setMarkerX:function(b,a){b.setLocalX(a)},adjustConstrainRegion:function(g,d,e,a,c){return g.adjust(d,e,a,c)},adjustColumnWidth:function(a){this.dragHd.setWidth(this.origWidth+a)}});Ext.define("Ext.grid.header.DragZone",{extend:Ext.dd.DragZone,colHeaderCls:Ext.baseCSSPrefix+"column-header",maxProxyWidth:120,constructor:function(a){this.headerCt=a;this.ddGroup=this.getDDGroup();this.callParent([a.el]);this.proxy.el.addCls(Ext.baseCSSPrefix+"grid-col-dd")},getDDGroup:function(){return"header-dd-zone-"+this.headerCt.up("[scrollerOwner]").id},getDragData:function(b){var d=b.getTarget("."+this.colHeaderCls),a,c;if(d){a=Ext.getCmp(d.id);if(!this.headerCt.dragging&&a.draggable&&!(a.isOnLeftEdge(b)||a.isOnRightEdge(b))){c=document.createElement("div");c.innerHTML=Ext.getCmp(d.id).text;return{ddel:c,header:a}}}return false},onBeforeDrag:function(){return !(this.headerCt.dragging||this.disabled)},onInitDrag:function(){this.headerCt.dragging=true;this.callParent(arguments)},onDragDrop:function(){this.headerCt.dragging=false;this.callParent(arguments)},afterRepair:function(){this.callParent();this.headerCt.dragging=false},getRepairXY:function(){return this.dragData.header.el.getXY()},disable:function(){this.disabled=true},enable:function(){this.disabled=false}});Ext.define("Ext.grid.header.DropZone",{extend:Ext.dd.DropZone,colHeaderCls:Ext.baseCSSPrefix+"column-header",proxyOffsets:[-4,-9],constructor:function(a){this.headerCt=a;this.ddGroup=this.getDDGroup();this.callParent([a.el])},getDDGroup:function(){return"header-dd-zone-"+this.headerCt.up("[scrollerOwner]").id},getTargetFromEvent:function(a){return a.getTarget("."+this.colHeaderCls)},getTopIndicator:function(){if(!this.topIndicator){this.self.prototype.topIndicator=Ext.DomHelper.append(Ext.getBody(),{cls:"col-move-top",html:"&#160;"},true);this.self.prototype.indicatorXOffset=Math.floor((this.topIndicator.dom.offsetWidth+1)/2)}return this.topIndicator},getBottomIndicator:function(){if(!this.bottomIndicator){this.self.prototype.bottomIndicator=Ext.DomHelper.append(Ext.getBody(),{cls:"col-move-bottom",html:"&#160;"},true)}return this.bottomIndicator},getLocation:function(d,b){var a=d.getXY()[0],c=Ext.fly(b).getRegion(),g;if((c.right-a)<=(c.right-c.left)/2){g="after"}else{g="before"}return{pos:g,header:Ext.getCmp(b.id),node:b}},positionIndicator:function(B,r,x){var A=this,s=B.header,g=A.getLocation(x,r),l=g.header,d=g.pos,q,k,c,w,n,u,v,a,b,m,o,z,y,p,j,t,h;if(l===A.lastTargetHeader&&d===A.lastDropPos){return}q=s.up("headercontainer:not(gridcolumn)");k=l.up("headercontainer:not(gridcolumn)");c=s.nextSibling("gridcolumn:not([hidden])");w=s.previousSibling("gridcolumn:not([hidden])");A.lastTargetHeader=l;A.lastDropPos=d;if(!l.draggable&&d==="before"&&l.getIndex()===0){return false}B.isLock=B.isUnlock=false;if(q!==k&&q.lockableInjected&&k.lockableInjected&&k.lockedCt){B.isLock=true}else{if(q!==k&&q.lockableInjected&&k.lockableInjected&&q.lockedCt){B.isUnlock=true}}if((B.isUnlock&&s.lockable===false)||(B.isLock&&!s.isLockable())){return false}B.dropLocation=g;if((s!==l)&&((d==="before"&&c!==l)||(d==="after"&&w!==l))&&!l.isDescendantOf(s)){p=Ext.dd.DragDropManager.getRelated(A);j=p.length;t=0;for(;t<j;t++){h=p[t];if(h!==A&&h.invalidateDrop){h.invalidateDrop()}}A.valid=true;n=A.getTopIndicator();u=A.getBottomIndicator();if(d==="before"){v="bc-tl";a="tc-bl"}else{v="bc-tr";a="tc-br"}b=n.getAlignToXY(l.el,v);m=u.getAlignToXY(l.el,a);o=A.headerCt.el;z=o.getX()-A.indicatorXOffset;y=o.getX()+o.getWidth();b[0]=Ext.Number.constrain(b[0],z,y);m[0]=Ext.Number.constrain(m[0],z,y);n.setXY(b);u.setXY(m);n.show();u.show()}else{A.invalidateDrop()}},invalidateDrop:function(){this.valid=false;this.hideIndicators()},onNodeOver:function(d,a,h,g){var c=this,b=true,j=g.header,i;if(g.header.el.dom===d){b=false}else{i=c.getLocation(h,d).header;b=(j.ownerCt===i.ownerCt)||(!j.ownerCt.sealed&&!i.ownerCt.sealed)}if(b){c.positionIndicator(g,d,h)}else{c.valid=false}return c.valid?c.dropAllowed:c.dropNotAllowed},hideIndicators:function(){var a=this;a.getTopIndicator().hide();a.getBottomIndicator().hide();a.lastTargetHeader=a.lastDropPos=null},onNodeOut:function(){this.hideIndicators()},onNodeDrop:function(n,c,q,t){if(this.valid){var p=t.header,g=t.dropLocation,k=g.header,s=p.ownerCt,l=s.items.indexOf(p),a=k.ownerCt,o=a.items.indexOf(k),i=this.headerCt,b=i.getHeaderIndex(p),m=p.isGroupHeader?p.query(":not([isGroupHeader])").length:1,r=i.getHeaderIndex(k),j=s===a,h,d;if(g.pos==="after"){o++;r+=k.isGroupHeader?k.query(":not([isGroupHeader])").length:1}if(t.isLock){h=s.up("[scrollerOwner]");h.lock(p,o);t.isLock=false;this.onNodeDrop(n,c,q,t)}else{if(t.isUnlock){h=s.up("[scrollerOwner]");h.unlock(p,o);t.isUnlock=false;this.onNodeDrop(n,c,q,t)}else{this.invalidateDrop();d=p.getWidth();if(j){if(o===l){i.onHeaderMoved(p,m,b,r);return}if(o>l){o-=1}}Ext.suspendLayouts();if(j){a.move(l,o)}else{s.remove(p,false);a.insert(o,p)}if(a.isGroupHeader){if(!j){p.savedFlex=p.flex;delete p.flex;p.width=d}}else{if(p.savedFlex){p.flex=p.savedFlex;delete p.width}}i.purgeCache();Ext.resumeLayouts(true);i.onHeaderMoved(p,m,b,r)}}}}});Ext.define("Ext.grid.plugin.HeaderReorderer",{extend:Ext.AbstractPlugin,alias:"plugin.gridheaderreorderer",init:function(a){this.headerCt=a;a.on({render:this.onHeaderCtRender,single:true,scope:this})},destroy:function(){Ext.destroy(this.dragZone,this.dropZone)},onHeaderCtRender:function(){var a=this;a.dragZone=new Ext.grid.header.DragZone(a.headerCt);a.dropZone=new Ext.grid.header.DropZone(a.headerCt);if(a.disabled){a.dragZone.disable()}},enable:function(){this.disabled=false;if(this.dragZone){this.dragZone.enable()}},disable:function(){this.disabled=true;if(this.dragZone){this.dragZone.disable()}}});Ext.define("Ext.grid.header.Container",{extend:Ext.container.Container,border:true,alias:"widget.headercontainer",baseCls:Ext.baseCSSPrefix+"grid-header-ct",dock:"top",weight:100,defaultType:"gridcolumn",detachOnRemove:false,defaultWidth:100,sortAscText:"Sort Ascending",sortDescText:"Sort Descending",sortClearText:"Clear Sort",columnsText:"Columns",headerOpenCls:Ext.baseCSSPrefix+"column-header-open",menuSortAscCls:Ext.baseCSSPrefix+"hmenu-sort-asc",menuSortDescCls:Ext.baseCSSPrefix+"hmenu-sort-desc",menuColsIcon:Ext.baseCSSPrefix+"cols-icon",triStateSort:false,ddLock:false,dragging:false,sortable:true,enableColumnHide:true,initComponent:function(){var a=this;a.headerCounter=0;a.plugins=a.plugins||[];if(!a.isHeader){if(a.enableColumnResize){a.resizer=new Ext.grid.plugin.HeaderResizer();a.plugins.push(a.resizer)}if(a.enableColumnMove){a.reorderer=new Ext.grid.plugin.HeaderReorderer();a.plugins.push(a.reorderer)}}if(a.isHeader&&!a.items){a.layout=a.layout||"container"}else{a.layout=Ext.apply({type:"gridcolumn",align:"stretchmax"},a.initialConfig.layout)}a.defaults=a.defaults||{};Ext.applyIf(a.defaults,{triStateSort:a.triStateSort,sortable:a.sortable});a.menuTask=new Ext.util.DelayedTask(a.updateMenuDisabledState,a);a.callParent();a.addEvents("columnresize","headerclick","headercontextmenu","headertriggerclick","columnmove","columnhide","columnshow","columnschanged","sortchange","menucreate")},isLayoutRoot:function(){if(this.hiddenHeaders){return false}return this.callParent()},getOwnerHeaderCt:function(){var a=this;return a.isRootHeader?a:a.up("[isRootHeader]")},onDestroy:function(){var a=this;if(a.menu){a.menu.un("hide",a.onMenuHide,a)}a.menuTask.cancel();Ext.destroy(a.resizer,a.reorderer);a.callParent()},applyColumnsState:function(e){if(!e||!e.length){return}var m=this,k=m.items.items,j=k.length,g=0,b=e.length,l,d,a,h;for(l=0;l<b;l++){a=e[l];for(h=j;h--;){d=k[h];if(d.getStateId&&d.getStateId()==a.id){if(g!==h){m.moveHeader(h,g)}if(d.applyColumnState){d.applyColumnState(a)}++g;break}}}},getColumnsState:function(){var b=this,a=[],c;b.items.each(function(d){c=d.getColumnState&&d.getColumnState();if(c){a.push(c)}});return a},onAdd:function(b){var a=this;if(!b.headerId){b.headerId=b.initialConfig.id||Ext.id(null,"header-")}if(!b.getStateId()){b.stateId=b.initialConfig.id||("h"+(++a.headerCounter))}a.callParent(arguments);a.onColumnsChanged()},onMove:function(){this.callParent(arguments);this.onColumnsChanged()},onShow:function(){this.callParent(arguments);this.onColumnsChanged()},onColumnsChanged:function(){var a=this.getOwnerHeaderCt();if(a){a.purgeCache();if(this.rendered){a.fireEvent("columnschanged",a)}}},onRemove:function(d){var b=this,a=b.ownerCt;b.callParent(arguments);if(!b.destroying){b.onColumnsChanged();if(b.isGroupHeader&&!b.items.getCount()&&a){b.detachComponent(d);Ext.suspendLayouts();a.remove(b);Ext.resumeLayouts(true)}}},applyDefaults:function(b){var a;if(b&&!b.isComponent&&b.xtype=="rownumberer"){a=b}else{a=this.callParent(arguments);if(!b.isGroupHeader&&!("width" in a)&&!a.flex){a.width=this.defaultWidth}}return a},setSortState:function(){var a=this.up("[store]").store,c=a.getFirstSorter(),b;if(c){b=this.down("gridcolumn[dataIndex="+c.property+"]");if(b){b.setSortState(c.direction,false,true)}}else{this.clearOtherSortStates(null)}},getHeaderMenu:function(){var b=this.getMenu(),a;if(b){a=b.child("#columnItem");if(a){return a.menu}}return null},onHeaderVisibilityChange:function(e,d){var b=this,c=b.getHeaderMenu(),a;if(c){a=b.getMenuItemForHeader(c,e);if(a){a.setChecked(d,true)}if(c.isVisible()){b.menuTask.delay(50)}}},updateMenuDisabledState:function(h){var g=this,d=g.query(":not([hidden])"),c,a=d.length,e,b,j;if(!h){h=g.getMenu()}for(c=0;c<a;++c){e=d[c];b=g.getMenuItemForHeader(h,e);if(b){j=e.isHideable()?"enable":"disable";if(b.menu){j+="CheckChange"}b[j]()}}},getMenuItemForHeader:function(a,b){return b?a.down("menucheckitem[headerId="+b.id+"]"):null},onHeaderShow:function(c){var b=this,a=b.ownerCt;if(b.forceFit){delete b.flex}b.onHeaderVisibilityChange(c,true);if(!c.isGroupHeader){if(a){a.onHeaderShow(b,c)}}b.fireEvent("columnshow",b,c);b.fireEvent("columnschanged",this)},onHeaderHide:function(c){var b=this,a=b.ownerCt;b.onHeaderVisibilityChange(c,false);if(!c.isGroupHeader){if(a){a.onHeaderHide(b,c)}}b.fireEvent("columnhide",b,c);b.fireEvent("columnschanged",this)},tempLock:function(){this.ddLock=true;Ext.Function.defer(function(){this.ddLock=false},200,this)},onHeaderResize:function(g,b,e){var d=this,a=d.view,c=d.ownerCt;if(a&&a.body.dom){d.tempLock();if(c){c.onHeaderResize(d,g,b)}}d.fireEvent("columnresize",this,g,b)},onHeaderClick:function(c,b,a){c.fireEvent("headerclick",this,c,b,a);this.fireEvent("headerclick",this,c,b,a)},onHeaderContextMenu:function(c,b,a){c.fireEvent("headercontextmenu",this,c,b,a);this.fireEvent("headercontextmenu",this,c,b,a)},onHeaderTriggerClick:function(d,c,a){var b=this;if(d.fireEvent("headertriggerclick",b,d,c,a)!==false&&b.fireEvent("headertriggerclick",b,d,c,a)!==false){b.showMenuBy(a,d)}},showMenuBy:function(b,g){var d=this.getMenu(),e=d.down("#ascItem"),c=d.down("#descItem"),a;d.activeHeader=d.ownerButton=g;g.setMenuActive(true);a=g.sortable?"enable":"disable";if(e){e[a]()}if(c){c[a]()}d.showBy(b)},onMenuHide:function(a){a.activeHeader.setMenuActive(false)},moveHeader:function(a,b){this.tempLock();this.onHeaderMoved(this.move(a,b),1,a,b)},purgeCache:function(){var a=this,b=a.menu;a.gridDataColumns=a.hideableColumns=null;if(b&&b.hidden){b.hide();b.destroy();a.menu=null}},onHeaderMoved:function(g,a,c,e){var d=this,b=d.ownerCt;if(b&&b.onHeaderMove){b.onHeaderMove(d,g,a,c,e)}d.fireEvent("columnmove",d,g,c,e)},getMenu:function(){var a=this;if(!a.menu){a.menu=new Ext.menu.Menu({hideOnParentHide:false,items:a.getMenuItems(),listeners:{hide:a.onMenuHide,scope:a}});a.fireEvent("menucreate",a,a.menu)}a.updateMenuDisabledState(a.menu);return a.menu},getMenuItems:function(){var c=this,b=[],a=c.enableColumnHide?c.getColumnMenu(c):null;if(c.sortable){b=[{itemId:"ascItem",text:c.sortAscText,cls:c.menuSortAscCls,handler:c.onSortAscClick,scope:c},{itemId:"descItem",text:c.sortDescText,cls:c.menuSortDescCls,handler:c.onSortDescClick,scope:c}]}if(a&&a.length){if(c.sortable){b.push("-")}b.push({itemId:"columnItem",text:c.columnsText,cls:c.menuColsIcon,menu:a,hideOnClick:false})}return b},onSortAscClick:function(){var b=this.getMenu(),a=b.activeHeader;a.setSortState("ASC")},onSortDescClick:function(){var b=this.getMenu(),a=b.activeHeader;a.setSortState("DESC")},getColumnMenu:function(g){var c=[],b=0,e,a=g.query(">gridcolumn[hideable]"),h=a.length,d;for(;b<h;b++){e=a[b];d=new Ext.menu.CheckItem({text:e.menuText||e.text,checked:!e.hidden,hideOnClick:false,headerId:e.id,menu:e.isGroupHeader?this.getColumnMenu(e):undefined,checkHandler:this.onColumnCheckChange,scope:this});c.push(d);e.on({destroy:Ext.Function.bind(d.destroy,d)})}return c},onColumnCheckChange:function(a,b){var c=Ext.getCmp(a.headerId);c[b?"show":"hide"]()},getColumnCount:function(){return this.getGridColumns().length},getFullWidth:function(){var c=0,b=this.getVisibleGridColumns(),e=b.length,a=0,d;for(;a<e;a++){d=b[a];if(d.getDesiredWidth){c+=d.getDesiredWidth()||0}else{c+=d.getWidth()}}return c},clearOtherSortStates:function(a){var c=this.getGridColumns(),d=c.length,b=0;for(;b<d;b++){if(c[b]!==a){c[b].setSortState(null,true)}}},getVisibleGridColumns:function(){var c=this.getGridColumns(),b=[],a=c.length,d;for(d=0;d<a;d++){if(!c[d].hidden){b[b.length]=c[d]}}return b},getGridColumns:function(h,a){if(!h&&this.gridDataColumns){return this.gridDataColumns}var g=this,k=h||[],e,b,d,j,c;a=a||g.hidden;if(g.items){e=g.items.items;for(b=0,d=e.length;b<d;b++){j=e[b];if(j.isGroupHeader){j.getGridColumns(k,a)}else{j.hiddenAncestor=a;k.push(j)}}}if(!h){g.gridDataColumns=k}if(!h&&d){for(b=0,d=k.length;b<d;b++){j=k[b];j.isFirstVisible=j.isLastVisible=false;if(!j.hidden||j.hiddenAncestor){if(!c){j.isFirstVisible=true}c=j}}if(c){c.isLastVisible=true}}return k},getHideableColumns:function(){var b=this,a=b.hideableColumns;if(!a){a=b.hideableColumns=b.query("[hideable]")}return a},getHeaderIndex:function(a){if(a.isGroupHeader){a=a.down(":not([isGroupHeader])")}return Ext.Array.indexOf(this.getGridColumns(),a)},getHeaderAtIndex:function(a){var b=this.getGridColumns();return b.length?b[a]:null},getVisibleHeaderClosestToIndex:function(b){var a=this.getHeaderAtIndex(b);if(a&&a.hidden){a=a.next(":not([hidden])")||a.prev(":not([hidden])")}return a},autoSizeColumn:function(b){var a=this.view;if(a){a.autoSizeColumn(b)}}});Ext.define("Ext.grid.column.Column",{extend:Ext.grid.header.Container,alias:"widget.gridcolumn",alternateClassName:"Ext.grid.Column",baseCls:Ext.baseCSSPrefix+"column-header",hoverCls:Ext.baseCSSPrefix+"column-header-over",handleWidth:4,sortState:null,possibleSortStates:["ASC","DESC"],childEls:["titleEl","triggerEl","textEl"],renderTpl:'<div id="{id}-titleEl" {tipMarkup}class="'+Ext.baseCSSPrefix+'column-header-inner"><span id="{id}-textEl" class="'+Ext.baseCSSPrefix+'column-header-text{childElCls}">{text}</span><tpl if="!menuDisabled"><div id="{id}-triggerEl" class="'+Ext.baseCSSPrefix+'column-header-trigger{childElCls}"></div></tpl></div>{%this.renderContainer(out,values)%}',dataIndex:null,text:"&#160;",menuText:null,emptyCellText:"&#160;",sortable:true,resizable:true,hideable:true,menuDisabled:false,renderer:false,editRenderer:false,align:"left",draggable:true,tooltipType:"qtip",initDraggable:Ext.emptyFn,tdCls:"",isHeader:true,ascSortCls:Ext.baseCSSPrefix+"column-header-sort-ASC",descSortCls:Ext.baseCSSPrefix+"column-header-sort-DESC",componentLayout:"columncomponent",groupSubHeaderCls:Ext.baseCSSPrefix+"group-sub-header",groupHeaderCls:Ext.baseCSSPrefix+"group-header",detachOnRemove:true,initResizable:Ext.emptyFn,initComponent:function(){var b=this,c,a;if(Ext.isDefined(b.header)){b.text=b.header;delete b.header}if(!b.triStateSort){b.possibleSortStates.length=2}if(Ext.isDefined(b.columns)){b.isGroupHeader=true;b.items=b.columns;delete b.columns;delete b.flex;delete b.width;b.cls=(b.cls||"")+" "+b.groupHeaderCls;b.sortable=false;b.resizable=false;b.align="center"}else{b.isContainer=false;if(b.flex){b.minWidth=b.minWidth||Ext.grid.plugin.HeaderResizer.prototype.minColWidth}}b.addCls(Ext.baseCSSPrefix+"column-header-align-"+b.align);c=b.renderer;if(c){if(typeof c=="string"){b.renderer=Ext.util.Format[c]}b.hasCustomRenderer=true}else{if(b.defaultRenderer){b.scope=b;b.renderer=b.defaultRenderer}}b.callParent(arguments);a={element:"el",click:b.onElClick,contextmenu:b.onElContextMenu,scope:b};if(b.resizable){a.dblclick=b.onElDblClick}b.on(a);b.on({element:"titleEl",mouseenter:b.onTitleMouseOver,mouseleave:b.onTitleMouseOut,scope:b})},onAdd:function(a){a.isSubHeader=true;if(this.hidden){a.hide()}a.addCls(this.groupSubHeaderCls);this.callParent(arguments)},onRemove:function(a){a.isSubHeader=false;a.removeCls(this.groupSubHeaderCls);this.callParent(arguments)},initRenderData:function(){var b=this,d="",c=b.tooltip,a=b.tooltipType=="qtip"?"data-qtip":"title";if(!Ext.isEmpty(c)){d=a+'="'+c+'" '}return Ext.applyIf(b.callParent(arguments),{text:b.text,menuDisabled:b.menuDisabled,tipMarkup:d})},applyColumnState:function(b){var a=this,c=Ext.isDefined;a.applyColumnsState(b.columns);if(c(b.hidden)){a.hidden=b.hidden}if(c(b.locked)){a.locked=b.locked}if(c(b.sortable)){a.sortable=b.sortable}if(c(b.width)){delete a.flex;a.width=b.width}else{if(c(b.flex)){delete a.width;a.flex=b.flex}}},getColumnState:function(){var e=this,b=e.items.items,a=b?b.length:0,d,c=[],g={id:e.getStateId()};e.savePropsToState(["hidden","sortable","locked","flex","width"],g);if(e.isGroupHeader){for(d=0;d<a;d++){c.push(b[d].getColumnState())}if(c.length){g.columns=c}}else{if(e.isSubHeader&&e.ownerCt.hidden){delete e.hidden}}if("width" in g){delete g.flex}return g},getStateId:function(){return this.stateId||this.headerId},setText:function(a){this.text=a;if(this.rendered){this.textEl.update(a)}},getIndex:function(){return this.isGroupColumn?false:this.getOwnerHeaderCt().getHeaderIndex(this)},getVisibleIndex:function(){return this.isGroupColumn?false:Ext.Array.indexOf(this.getOwnerHeaderCt().getVisibleGridColumns(),this)},beforeRender:function(){var b=this,a=b.up("tablepanel");b.callParent();if(a&&(!b.sortable||a.sortableColumns===false)&&!b.groupable&&!b.lockable&&(a.enableColumnHide===false||!b.getOwnerHeaderCt().getHideableColumns().length)){b.menuDisabled=true}b.protoEl.unselectable()},afterRender:function(){var b=this,a=b.el;b.callParent(arguments);if(b.overCls){a.addClsOnOver(b.overCls)}if(!Ext.isIE8||!Ext.isStrict){b.mon(b.getFocusEl(),{focus:b.onTitleMouseOver,blur:b.onTitleMouseOut,scope:b})}b.keyNav=new Ext.util.KeyNav(a,{enter:b.onEnterKey,down:b.onDownKey,scope:b})},afterComponentLayout:function(d,a,c,g){var e=this,b=e.getOwnerHeaderCt();e.callParent(arguments);if(b&&(c!=null||e.flex)&&d!==c){b.onHeaderResize(e,d,true)}},setPadding:function(b,i){var d=this,h=d.textEl.dom.offsetHeight,a=d.titleEl,g=a.dom.offsetHeight,e,c;i-=b.borderInfo.height;if(b.innerCtContext){d.layout.innerCt.setHeight(i-g)}else{if(g<i){if(h){g=i;i-=h;e=Math.floor(i/2);c=i-e;a.setStyle({paddingTop:e+"px",paddingBottom:c+"px"})}}}if((Ext.isIE6||Ext.isIEQuirks)&&d.triggerEl){d.triggerEl.setHeight(g)}},onDestroy:function(){var a=this;Ext.destroy(a.textEl,a.keyNav,a.field);delete a.keyNav;a.callParent(arguments)},onTitleMouseOver:function(){this.titleEl.addCls(this.hoverCls)},onTitleMouseOut:function(){this.titleEl.removeCls(this.hoverCls)},onDownKey:function(a){if(this.triggerEl){this.onElClick(a,this.triggerEl.dom||this.el.dom)}},onEnterKey:function(a){this.onElClick(a,this.el.dom)},onElDblClick:function(g,a){var c=this,b,d;if(c.isOnLeftEdge(g)){b=c.previousNode("gridcolumn:not([hidden]):not([isGroupHeader])");if(b&&b.getOwnerHeaderCt()===c.getOwnerHeaderCt()){b.autoSize()}}else{if(c.isOnRightEdge(g)){if(c.isGroupHeader&&g.getPoint().isContainedBy(c.layout.innerCt)){d=c.query("gridcolumn:not([hidden]):not([isGroupHeader])");this.getOwnerHeaderCt().autoSizeColumn(d[d.length-1]);return}c.autoSize()}}},autoSize:function(){var b=this,c,e,a,d;if(b.isGroupHeader){c=b.query("gridcolumn:not([hidden]):not([isGroupHeader])");e=c.length;d=this.getOwnerHeaderCt();Ext.suspendLayouts();for(a=0;a<e;a++){d.autoSizeColumn(c[a])}Ext.resumeLayouts(true);return}this.getOwnerHeaderCt().autoSizeColumn(this)},onElClick:function(d,b){var c=this,a=c.getOwnerHeaderCt();if(a&&!a.ddLock){if(c.triggerEl&&(d.target===c.triggerEl.dom||b===c.triggerEl.dom||d.within(c.triggerEl))){a.onHeaderTriggerClick(c,d,b)}else{if(d.getKey()||(!c.isOnLeftEdge(d)&&!c.isOnRightEdge(d))){c.toggleSortState();a.onHeaderClick(c,d,b)}}}},onElContextMenu:function(d,b){var c=this,a=c.getOwnerHeaderCt();if(a&&!a.ddLock){a.onHeaderContextMenu(c,d,b)}},processEvent:function(g,b,a,c,d,h){return this.fireEvent.apply(this,arguments)},toggleSortState:function(){var b=this,a,c;if(b.sortable){a=Ext.Array.indexOf(b.possibleSortStates,b.sortState);c=(a+1)%b.possibleSortStates.length;b.setSortState(b.possibleSortStates[c])}},doSort:function(c){var b=this.up("tablepanel"),a=b.store;if(b.ownerLockable&&a.isNodeStore){a=b.ownerLockable.lockedGrid.store}a.sort({property:this.getSortParam(),direction:c})},getSortParam:function(){return this.dataIndex},setSortState:function(g,e,c){var d=this,h=d.ascSortCls,b=d.descSortCls,a=d.getOwnerHeaderCt(),i=d.sortState;g=g||null;if(!d.sorting&&i!==g&&d.getSortParam()){if(g&&!c){d.sorting=true;d.doSort(g);d.sorting=false}switch(g){case"DESC":d.addCls(b);d.removeCls(h);break;case"ASC":d.addCls(h);d.removeCls(b);break;default:d.removeCls([h,b])}if(a&&!d.triStateSort&&!e){a.clearOtherSortStates(d)}d.sortState=g;if(d.triStateSort||g!=null){a.fireEvent("sortchange",a,d,g)}}},isHideable:function(){var a={hideCandidate:this,result:this.hideable};if(a.result){this.ownerCt.bubble(this.hasOtherMenuEnabledChildren,null,[a])}return a.result},hasOtherMenuEnabledChildren:function(a){var b,c;if(!this.isXType("headercontainer")){a.result=false;return false}b=this.query(">:not([hidden]):not([menuDisabled])");c=b.length;if(Ext.Array.contains(b,a.hideCandidate)){c--}if(c){return false}a.hideCandidate=this},isLockable:function(){var a={result:this.lockable!==false};if(a.result){this.ownerCt.bubble(this.hasMultipleVisibleChildren,null,[a])}return a.result},hasMultipleVisibleChildren:function(a){if(!this.isXType("headercontainer")){a.result=false;return false}if(this.query(">:not([hidden])").length>1){return false}},hide:function(c){var j=this,e=j.getOwnerHeaderCt(),b=j.ownerCt,a,k,h,g,d;if(!e){j.callParent();return j}if(e.forceFit){j.visibleSiblingCount=e.getVisibleGridColumns().length-1;if(j.flex){j.savedWidth=j.getWidth();delete j.flex}}a=b.isGroupHeader;if(a&&!c){h=b.query(">:not([hidden])");if(h.length===1&&h[0]==j){j.ownerCt.hide();return}}Ext.suspendLayouts();if(j.isGroupHeader){h=j.items.items;for(d=0,g=h.length;d<g;d++){k=h[d];if(!k.hidden){k.hide(true)}}}j.callParent();e.onHeaderHide(j);Ext.resumeLayouts(true);return j},show:function(g,h){var n=this,k=n.getOwnerHeaderCt(),d=n.ownerCt,m,l,j,o,b,a,e,c;if(!n.rendered){n.hidden=false;return}a=k.el.getViewSize().width-(k.view.el.dom.scrollHeight>k.view.el.dom.clientHeight?Ext.getScrollbarSize().width:0);if(k.forceFit){m=Ext.ComponentQuery.query(":not([flex])",k.getVisibleGridColumns());if(m.length){n.width=n.savedWidth||n.width||Ext.grid.header.Container.prototype.defaultWidth}else{m=k.getVisibleGridColumns();l=m.length;c=n.visibleSiblingCount;b=(n.savedWidth||n.width||Ext.grid.header.Container.prototype.defaultWidth);b=Math.min(Math.max(b*(c/l),Ext.grid.header.Container.prototype.defaultWidth),a-(l*Ext.grid.header.Container.prototype.defaultWidth));delete n.width;n.flex=b;a-=b;e=0;for(j=0;j<l;j++){o=m[j];o.flex=(o.width||o.getWidth());e+=o.flex;delete o.width}for(j=0;j<l;j++){o=m[j];o.flex=o.flex/e*a}}}Ext.suspendLayouts();if(n.isSubHeader&&d.hidden){d.show(false,true)}n.callParent(arguments);if(n.isGroupHeader&&h!==true&&!n.query(":not([hidden])").length){m=n.items.items;for(j=0,l=m.length;j<l;j++){o=m[j];if(o.hidden){o.show(true)}}}Ext.resumeLayouts(true);d=n.getOwnerHeaderCt();if(d){d.onHeaderShow(n)}},getDesiredWidth:function(){var a=this;if(a.rendered&&a.componentLayout&&a.componentLayout.lastComponentSize){return a.componentLayout.lastComponentSize.width}else{if(a.flex){return a.width}else{return a.width}}},getCellSelector:function(){return"."+Ext.baseCSSPrefix+"grid-cell-"+this.getItemId()},getCellInnerSelector:function(){return this.getCellSelector()+" ."+Ext.baseCSSPrefix+"grid-cell-inner"},isOnLeftEdge:function(a){return(a.getXY()[0]-this.getX()<=this.handleWidth)},isOnRightEdge:function(a){return(this.getX()+this.getWidth()-a.getXY()[0]<=this.handleWidth)},setMenuActive:function(a){this.titleEl[a?"addCls":"removeCls"](this.headerOpenCls)}});Ext.define("Ext.grid.RowNumberer",{extend:Ext.grid.column.Column,alias:"widget.rownumberer",text:"&#160",width:23,sortable:false,draggable:false,autoLock:true,lockable:false,align:"right",constructor:function(a){this.width=this.width;this.callParent(arguments);if(this.rowspan){this.renderer=Ext.Function.bind(this.renderer,this)}},resizable:false,hideable:false,menuDisabled:true,dataIndex:"",cls:Ext.baseCSSPrefix+"row-numberer",rowspan:undefined,renderer:function(e,b,a,d,h,c){var g=this.rowspan;if(g){b.tdAttr='rowspan="'+g+'"'}b.tdCls=Ext.baseCSSPrefix+"grid-cell-special";return d+1}});Ext.define("Ext.view.DropZone",{extend:Ext.dd.DropZone,indicatorHtml:'<div class="'+Ext.baseCSSPrefix+'grid-drop-indicator-left"></div><div class="'+Ext.baseCSSPrefix+'grid-drop-indicator-right"></div>',indicatorCls:Ext.baseCSSPrefix+"grid-drop-indicator",constructor:function(a){var b=this;Ext.apply(b,a);if(!b.ddGroup){b.ddGroup="view-dd-zone-"+b.view.id}b.callParent([b.view.el])},fireViewEvent:function(){var b=this,a;b.lock();a=b.view.fireEvent.apply(b.view,arguments);b.unlock();return a},getTargetFromEvent:function(k){var j=k.getTarget(this.view.getItemSelector()),d,c,b,g,a,h;if(!j){d=k.getPageY();for(g=0,c=this.view.getNodes(),a=c.length;g<a;g++){b=c[g];h=Ext.fly(b).getBox();if(d<=h.bottom){return b}}}return j},getIndicator:function(){var a=this;if(!a.indicator){a.indicator=new Ext.Component({html:a.indicatorHtml,cls:a.indicatorCls,ownerCt:a.view,floating:true,shadow:false})}return a.indicator},getPosition:function(c,a){var g=c.getXY()[1],b=Ext.fly(a).getRegion(),d;if((b.bottom-g)>=(b.bottom-b.top)/2){d="before"}else{d="after"}return d},containsRecordAtOffset:function(d,b,g){if(!b){return false}var a=this.view,c=a.indexOf(b),e=a.getNode(c+g,true),h=e?a.getRecord(e):null;return h&&Ext.Array.contains(d,h)},positionIndicator:function(b,c,d){var g=this,i=g.view,h=g.getPosition(d,b),k=i.getRecord(b),a=c.records,j;if(!Ext.Array.contains(a,k)&&(h=="before"&&!g.containsRecordAtOffset(a,k,-1)||h=="after"&&!g.containsRecordAtOffset(a,k,1))){g.valid=true;if(g.overRecord!=k||g.currentPosition!=h){j=Ext.fly(b).getY()-i.el.getY()-1;if(h=="after"){j+=Ext.fly(b).getHeight()}g.getIndicator().setWidth(Ext.fly(i.el).getWidth()).showAt(0,j);g.overRecord=k;g.currentPosition=h}}else{g.invalidateDrop()}},invalidateDrop:function(){if(this.valid){this.valid=false;this.getIndicator().hide()}},onNodeOver:function(c,a,g,d){var b=this;if(!Ext.Array.contains(d.records,b.view.getRecord(c))){b.positionIndicator(c,d,g)}return b.valid?b.dropAllowed:b.dropNotAllowed},notifyOut:function(c,a,g,d){var b=this;b.callParent(arguments);b.overRecord=b.currentPosition=null;b.valid=false;if(b.indicator){b.indicator.hide()}},onContainerOver:function(a,h,g){var d=this,b=d.view,c=b.dataSource.getCount();if(c){d.positionIndicator(b.all.last(),g,h)}else{d.overRecord=d.currentPosition=null;d.getIndicator().setWidth(Ext.fly(b.el).getWidth()).showAt(0,0);d.valid=true}return d.dropAllowed},onContainerDrop:function(a,c,b){return this.onNodeDrop(a,null,c,b)},onNodeDrop:function(i,a,h,g){var d=this,c=false,b={wait:false,processDrop:function(){d.invalidateDrop();d.handleNodeDrop(g,d.overRecord,d.currentPosition);c=true;d.fireViewEvent("drop",i,g,d.overRecord,d.currentPosition)},cancelDrop:function(){d.invalidateDrop();c=true}},j=false;if(d.valid){j=d.fireViewEvent("beforedrop",i,g,d.overRecord,d.currentPosition,b);if(b.wait){return}if(j!==false){if(!c){b.processDrop()}}}return j},destroy:function(){Ext.destroy(this.indicator);delete this.indicator;this.callParent()}});Ext.define("Ext.grid.ViewDropZone",{extend:Ext.view.DropZone,indicatorHtml:'<div class="'+Ext.baseCSSPrefix+'grid-drop-indicator-left"></div><div class="'+Ext.baseCSSPrefix+'grid-drop-indicator-right"></div>',indicatorCls:Ext.baseCSSPrefix+"grid-drop-indicator",handleNodeDrop:function(b,d,e){var j=this.view,k=j.getStore(),h,a,c,g;if(b.copy){a=b.records;b.records=[];for(c=0,g=a.length;c<g;c++){b.records.push(a[c].copy())}}else{b.view.store.remove(b.records,b.view===j)}if(d&&e){h=k.indexOf(d);if(e!=="before"){h++}k.insert(h,b.records)}else{k.add(b.records)}j.getSelectionModel().select(b.records)}});Ext.define("Ext.grid.column.Action",{extend:Ext.grid.column.Column,alias:["widget.actioncolumn"],alternateClassName:"Ext.grid.ActionColumn",actionIdRe:new RegExp(Ext.baseCSSPrefix+"action-col-(\\d+)"),altText:"",menuText:"<i>Actions</i>",sortable:false,constructor:function(d){var g=this,b=Ext.apply({},d),c=b.items||g.items||[g],h,e,a;g.origRenderer=b.renderer||g.renderer;g.origScope=b.scope||g.scope;g.renderer=g.scope=b.renderer=b.scope=null;b.items=null;g.callParent([b]);g.items=c;for(e=0,a=c.length;e<a;++e){if(c[e].getClass){h=true;break}}if(g.origRenderer||h){g.hasCustomRenderer=true}},defaultRenderer:function(o,r,e,a,d,n,m){var l=this,g=Ext.baseCSSPrefix,q=l.origScope||l,k=l.items,h=k.length,c=0,p,j,b,s;j=Ext.isFunction(l.origRenderer)?l.origRenderer.apply(q,arguments)||"":"";r.tdCls+=" "+Ext.baseCSSPrefix+"action-col-cell";for(;c<h;c++){p=k[c];b=p.disabled||(p.isDisabled?p.isDisabled.call(p.scope||q,m,a,d,p,e):false);s=b?null:(p.tooltip||(p.getTip?p.getTip.apply(p.scope||q,arguments):null));if(!p.hasActionConfiguration){p.stopSelection=l.stopSelection;p.disable=Ext.Function.bind(l.disableAction,l,[c],0);p.enable=Ext.Function.bind(l.enableAction,l,[c],0);p.hasActionConfiguration=true}j+='<img alt="'+(p.altText||l.altText)+'" src="'+(p.icon||Ext.BLANK_IMAGE_URL)+'" class="'+g+"action-col-icon "+g+"action-col-"+String(c)+" "+(b?g+"item-disabled":" ")+" "+(Ext.isFunction(p.getClass)?p.getClass.apply(p.scope||q,arguments):(p.iconCls||l.iconCls||""))+'"'+(s?' data-qtip="'+s+'"':"")+" />"}return j},enableAction:function(b,a){var c=this;if(!b){b=0}else{if(!Ext.isNumber(b)){b=Ext.Array.indexOf(c.items,b)}}c.items[b].disabled=false;c.up("tablepanel").el.select("."+Ext.baseCSSPrefix+"action-col-"+b).removeCls(c.disabledCls);if(!a){c.fireEvent("enable",c)}},disableAction:function(b,a){var c=this;if(!b){b=0}else{if(!Ext.isNumber(b)){b=Ext.Array.indexOf(c.items,b)}}c.items[b].disabled=true;c.up("tablepanel").el.select("."+Ext.baseCSSPrefix+"action-col-"+b).addCls(c.disabledCls);if(!a){c.fireEvent("disable",c)}},destroy:function(){delete this.items;delete this.renderer;return this.callParent(arguments)},processEvent:function(j,m,o,b,k,h,d,q){var i=this,g=h.getTarget(),c,p,l,n=j=="keydown"&&h.getKey(),a;if(n&&!Ext.fly(g).findParent(m.getCellSelector())){g=Ext.fly(o).down("."+Ext.baseCSSPrefix+"action-col-icon",true)}if(g&&(c=g.className.match(i.actionIdRe))){p=i.items[parseInt(c[1],10)];a=p.disabled||(p.isDisabled?p.isDisabled.call(p.scope||i.origScope||i,m,b,k,p,d):false);if(p&&!a){if(j=="click"||(n==h.ENTER||n==h.SPACE)){l=p.handler||i.handler;if(l){l.call(p.scope||i.origScope||i,m,b,k,p,h,d,q)}}else{if(j=="mousedown"&&p.stopSelection!==false){return false}}}}return i.callParent(arguments)},cascade:function(b,a){b.call(a||this,this)},getRefItems:function(){return[]}});Ext.define("Ext.grid.column.Boolean",{extend:Ext.grid.column.Column,alias:["widget.booleancolumn"],alternateClassName:"Ext.grid.BooleanColumn",trueText:"true",falseText:"false",undefinedText:"&#160;",defaultRenderer:function(a){if(a===undefined){return this.undefinedText}if(!a||a==="false"){return this.falseText}return this.trueText}});Ext.define("Ext.grid.column.CheckColumn",{extend:Ext.grid.column.Column,alternateClassName:"Ext.ux.CheckColumn",alias:"widget.checkcolumn",align:"center",stopSelection:true,tdCls:Ext.baseCSSPrefix+"grid-cell-checkcolumn",constructor:function(){this.addEvents("beforecheckchange","checkchange");this.scope=this;this.callParent(arguments)},processEvent:function(h,j,n,b,i,d,c,o){var g=this,m=h==="keydown"&&d.getKey(),a=h=="mousedown";if(!g.disabled&&(a||(m==d.ENTER||m==d.SPACE))){var k=g.dataIndex,l=!c.get(k);if(g.fireEvent("beforecheckchange",g,b,l)!==false){c.set(k,l);g.fireEvent("checkchange",g,b,l);if(a){d.stopEvent()}if(!g.stopSelection){j.selModel.selectByPosition({row:b,column:i})}return false}else{return !g.stopSelection}}else{return g.callParent(arguments)}},onEnable:function(a){var b=this;b.callParent(arguments);b.up("tablepanel").el.select("."+Ext.baseCSSPrefix+"grid-cell-"+b.id).removeCls(b.disabledCls);if(!a){b.fireEvent("enable",b)}},onDisable:function(a){var b=this;b.callParent(arguments);b.up("tablepanel").el.select("."+Ext.baseCSSPrefix+"grid-cell-"+b.id).addCls(b.disabledCls);if(!a){b.fireEvent("disable",b)}},renderer:function(b,c){var d=Ext.baseCSSPrefix,a=[d+"grid-checkcolumn"];if(this.disabled){c.tdCls+=" "+this.disabledCls}if(b){a.push(d+"grid-checkcolumn-checked")}return'<img class="'+a.join(" ")+'" src="'+Ext.BLANK_IMAGE_URL+'"/>'}});Ext.define("Ext.grid.column.Date",{extend:Ext.grid.column.Column,alias:["widget.datecolumn"],alternateClassName:"Ext.grid.DateColumn",initComponent:function(){if(!this.format){this.format=Ext.Date.defaultFormat}this.callParent(arguments)},defaultRenderer:function(a){return Ext.util.Format.date(a,this.format)}});Ext.define("Ext.grid.column.Number",{extend:Ext.grid.column.Column,alias:["widget.numbercolumn"],alternateClassName:"Ext.grid.NumberColumn",format:"0,000.00",defaultRenderer:function(a){return Ext.util.Format.number(a,this.format)}});Ext.define("Ext.grid.column.Template",{extend:Ext.grid.column.Column,alias:["widget.templatecolumn"],alternateClassName:"Ext.grid.TemplateColumn",initComponent:function(){var a=this;a.tpl=(!Ext.isPrimitive(a.tpl)&&a.tpl.compile)?a.tpl:new Ext.XTemplate(a.tpl);a.hasCustomRenderer=true;a.callParent(arguments)},defaultRenderer:function(c,d,a){var b=Ext.apply({},a.data,a.getAssociatedData());return this.tpl.apply(b)}});Ext.define("Ext.grid.feature.Feature",{extend:Ext.util.Observable,alias:"feature.feature",wrapsItem:false,isFeature:true,disabled:false,hasFeatureEvent:true,eventPrefix:null,eventSelector:null,view:null,grid:null,constructor:function(a){this.initialConfig=a;this.callParent(arguments)},clone:function(){return new this.self(this.initialConfig)},init:Ext.emptyFn,destroy:function(){this.clearListeners()},getFireEventArgs:function(b,a,c,d){return[b,a,c,d]},vetoEvent:Ext.emptyFn,enable:function(){this.disabled=false},disable:function(){this.disabled=true}});Ext.define("Ext.grid.feature.AbstractSummary",{extend:Ext.grid.feature.Feature,alias:"feature.abstractsummary",summaryRowCls:Ext.baseCSSPrefix+"grid-row-summary",summaryTableCls:Ext.baseCSSPrefix+"table-plain "+Ext.baseCSSPrefix+"grid-table",summaryRowSelector:"."+Ext.baseCSSPrefix+"grid-row-summary",summaryRowTpl:{before:function(a,b){if(a.record.isSummary){this.summaryFeature.outputSummaryRecord(a.record,a,b);return false}},priority:1000},showSummaryRow:true,init:function(){var a=this;a.view.summaryFeature=a;a.rowTpl=a.view.self.prototype.rowTpl;a.view.addRowTpl(a.summaryRowTpl).summaryFeature=a},toggleSummaryRow:function(a){this.showSummaryRow=!!a},outputSummaryRecord:function(g,l,d){var h=l.view,a=h.rowValues,c=l.columns||h.headerCt.getGridColumns(),k=c.length,e,b,j={view:h,record:g,rowStyle:"",rowClasses:[this.summaryRowCls],itemClasses:[],recordIndex:-1,rowId:h.getRowId(g),columns:c,visibleColumns:l.visibleColumns||h.headerCt.getVisibleGridColumns()};for(e=0;e<k;e++){b=c[e];b.savedRenderer=b.renderer;if(b.summaryRenderer){b.renderer=b.summaryRenderer}else{if(!b.summaryType){b.renderer=Ext.emptyFn}}if(!b.dataIndex){b.dataIndex=b.id}}h.rowValues=j;h.self.prototype.rowTpl.applyOut(j,d);h.rowValues=a;for(e=0;e<k;e++){b=c[e];b.renderer=b.savedRenderer;b.savedRenderer=null}},getSummary:function(b,c,e,d){var a=d.records;if(c){if(Ext.isFunction(c)){return b.getAggregate(c,null,a,[e])}switch(c){case"count":return a.length;case"min":return b.getMin(a,e);case"max":return b.getMax(a,e);case"sum":return b.getSum(a,e);case"average":return b.getAverage(a,e);default:return""}}},generateSummaryData:function(){var l=this,o=l.view.store,c=o.groups.items,h=o.proxy.reader,j=c.length,a=l.getGroupField(),e={},k=l.lockingPartner,d,p,g,m,r,b,q,n;if(l.remoteRoot&&h.rawData){b=true;n={};m=h.root;h.root=l.remoteRoot;h.buildExtractors(true);r=h.getRoot(h.rawData);j=r.length;if(!h.convertRecordData){h.buildExtractors()}for(d=0;d<j;++d){q={};h.convertRecordData(q,r[d]);n[q[a]]=q}h.root=m;h.buildExtractors(true)}for(d=0;d<j;++d){p=c[d];if(b||p.isDirty()||!p.hasAggregate()){if(b){g=l.populateRemoteRecord(p,n)}else{g=l.populateRecord(p)}if(!k||(l.view.ownerCt===l.view.ownerCt.ownerLockable.normalGrid)){p.commit()}}else{g=p.getAggregateRecord();if(k&&!g.hasPartnerData){l.populateRecord(p);g.hasPartnerData=true}}e[p.key]=g}return e},populateRemoteRecord:function(e,c){var a=e.getAggregateRecord(true),b=c[e.key],d;a.beginEdit();for(d in b){if(b.hasOwnProperty(d)){if(d!==a.idProperty){a.set(d,b[d])}}}a.endEdit(true);a.commit(true);return a},populateRecord:function(k){var g=this,h=g.view,j=h.store,d=k.getAggregateRecord(),b=h.headerCt.getGridColumns(),e=b.length,c,a,l;d.beginEdit();for(c=0;c<e;++c){a=b[c];l=a.dataIndex||a.id;d.set(l,g.getSummary(j,a.summaryType,l,k))}d.endEdit(true);d.commit();return d}});Ext.define("Ext.grid.feature.GroupStore",{extend:Ext.util.Observable,isStore:true,constructor:function(c,a){var b=this;b.superclass.constructor.apply(b,arguments);b.groupingFeature=c;b.bindStore(a);b.processStore(a);b.view.dataSource=b},bindStore:function(a){var b=this;if(b.store){Ext.destroy(b.storeListeners);b.store=null}if(a){b.storeListeners=a.on({bulkremove:b.onBulkRemove,add:b.onAdd,update:b.onUpdate,refresh:b.onRefresh,clear:b.onClear,scope:b,destroyable:true});b.store=a}},processStore:function(j){var h=this,b=j.model,a=j.getGroups(),l=a.length,e,m,n,d=h.data,k=this.groupingFeature.groupCache,c=this.groupingFeature.groupCache={},g=h.groupingFeature.startCollapsed;if(d){d.clear()}else{d=h.data=new Ext.util.MixedCollection(false,Ext.data.Store.recordIdFn)}for(e=0;e<l;e++){m=a[e];c[m.name]=m;m.isCollapsed=g||(k[m.name]&&k[m.name].isCollapsed);if(m.isCollapsed){m.placeholder=n=new b(null,"group-"+m.name+"-placeholder");n.set(h.getGroupField(),m.name);n.rows=n.children=m.children;d.add(n)}else{d.insert(h.data.length,m.children)}}},isCollapsed:function(a){return this.groupingFeature.groupCache[a].isCollapsed},isInCollapsedGroup:function(a){var b;if(this.store.isGrouped()&&(b=this.groupingFeature.groupCache[a.get(this.getGroupField())])){return b.isCollapsed||false}return false},getCount:function(){return this.data.getCount()},getTotalCount:function(){return this.data.getCount()},rangeCached:function(){return true},getRange:function(d,b,c){var a=this.data.getRange(d,b);if(c&&c.callback){c.callback.call(c.scope||this,a,d,b,c)}return a},getAt:function(a){return this.getRange(a,a)[0]},getById:function(a){return this.store.getById(a)},indexOf:function(d,j){var e=this,a,b,h,c,k,g,l=0;if(d&&!e.isInCollapsedGroup(d)){a=e.store.groupField;b=e.store.getGroups();h=b.length;for(c=0;c<h;c++){k=b[c];if(k.name===d.get(a)){g=Ext.Array.indexOf(k.children,d);return l+g}l+=(j&&this.isCollapsed(k.name))?1:k.children.length}}return -1},onRefresh:function(a){this.processStore(this.store);this.fireEvent("refresh",this)},onBulkRemove:function(b,a,c){this.processStore(this.store);this.fireEvent("refresh",this)},onClear:function(b,a,c){this.processStore(this.store);this.fireEvent("clear",this)},onAdd:function(b,a,c){this.processStore(this.store);this.fireEvent("refresh",this)},onUpdate:function(c,a,b,h){var g=this,d=g.groupingFeature.getRecordGroup(a),i,e;if(c.isGrouped()){if(h&&Ext.Array.contains(h,g.groupingFeature.getGroupField())){return g.onRefresh(g.store)}if(d.isCollapsed){g.fireEvent("update",g,d.placeholder)}else{Ext.suspendLayouts();g.fireEvent("update",g,a,b,h);i=d.children[0];e=d.children[d.children.length-1];if(i!==a){g.fireEvent("update",g,i,"edit")}if(e!==a&&e!==i){g.fireEvent("update",g,e,"edit")}Ext.resumeLayouts(true)}}}});Ext.define("Ext.grid.feature.Grouping",{extend:Ext.grid.feature.Feature,mixins:{summary:Ext.grid.feature.AbstractSummary},alias:"feature.grouping",eventPrefix:"group",groupCls:Ext.baseCSSPrefix+"grid-group-hd",eventSelector:"."+Ext.baseCSSPrefix+"grid-group-hd",refreshData:{},groupInfo:{},wrapsItem:true,groupHeaderTpl:"{columnName}: {name}",depthToIndent:17,collapsedCls:Ext.baseCSSPrefix+"grid-group-collapsed",hdCollapsedCls:Ext.baseCSSPrefix+"grid-group-hd-collapsed",hdNotCollapsibleCls:Ext.baseCSSPrefix+"grid-group-hd-not-collapsible",collapsibleCls:Ext.baseCSSPrefix+"grid-group-hd-collapsible",ctCls:Ext.baseCSSPrefix+"group-hd-container",groupByText:"Group by this field",showGroupsText:"Show in groups",hideGroupedHeader:false,startCollapsed:false,enableGroupingMenu:true,enableNoGroups:true,collapsible:true,expandTip:"Click to expand. CTRL key collapses all others",collapseTip:"Click to collapse. CTRL/click collapses all others",showSummaryRow:false,tableTpl:{before:function(a){if(a.rows.length===1&&a.rows[0].isSummary){return}this.groupingFeature.setup(a.rows,a.view.rowValues)},after:function(a){if(a.rows.length===1&&a.rows[0].isSummary){return}this.groupingFeature.cleanup(a.rows,a.view.rowValues)},priority:200},groupTpl:["{%","var me = this.groupingFeature;","me.setupRowData(values.record, values.recordIndex, values);","values.needsWrap = values.isFirstRow || values.summaryRecord;","values.recordIndex += me.skippedRows;","%}",'<tpl if="needsWrap">','<tr data-boundView="{view.id}" data-recordId="{record.internalId}" data-recordIndex="{[values.isCollapsedGroup ? -1 : values.recordIndex]}" class="{[values.itemClasses.join(" ")]} '+Ext.baseCSSPrefix+'grid-wrap-row">','<td class="'+Ext.baseCSSPrefix+'group-hd-container" colspan="{columns.length}">','<tpl if="isFirstRow">',"{%",'var groupTitleStyle = (!values.view.lockingPartner || (values.view.ownerCt === values.view.ownerCt.ownerLockable.lockedGrid) || (values.view.lockingPartner.headerCt.getVisibleGridColumns().length === 0)) ? "" : "visibility:hidden";',"%}",'<div id="{groupId}" class="'+Ext.baseCSSPrefix+'grid-group-hd {collapsibleCls}" tabIndex="0">','<div class="'+Ext.baseCSSPrefix+'grid-group-title" style="{[groupTitleStyle]}">','{[values.groupHeaderTpl.apply(values.groupInfo, parent) || "&#160;"]}',"</div>","</div>","</tpl>",'<tpl if="summaryRecord || !isCollapsedGroup">','<table class="'+Ext.baseCSSPrefix+"{view.id}-table "+Ext.baseCSSPrefix+'grid-table" border="0" cellspacing="0" cellpadding="0" style="width:100%">',"{[values.view.renderColumnSizer(out)]}",'<tpl if="!isCollapsedGroup">',"{%","values.itemClasses.length = 0;","this.nextTpl.applyOut(values, out, parent);","%}","</tpl>",'<tpl if="summaryRecord">',"{%me.outputSummaryRecord(values.summaryRecord, values, out);%}","</tpl>","</table>","</tpl>","</td>","</tr>","{%","if (values.isCollapsedGroup) {","me.skippedRows += me.getRecordGroup(values.record).children.length - 1;","}","%}","<tpl else>","{%this.nextTpl.applyOut(values, out, parent);%}","</tpl>",{priority:200,syncRowHeights:function(d,j){d=Ext.fly(d,"syncDest");j=Ext.fly(j,"sycSrc");var b=this.owner,e=d.down(b.eventSelector,true),g,h=d.down(b.summaryRowSelector,true),c,a,i;if(e&&(g=j.down(b.eventSelector,true))){e.style.height=g.style.height="";if((a=e.offsetHeight)>(i=g.offsetHeight)){Ext.fly(g).setHeight(a)}else{if(i>a){Ext.fly(e).setHeight(i)}}}if(h&&(c=j.down(b.summaryRowSelector,true))){h.style.height=c.style.height="";if((a=h.offsetHeight)>(i=c.offsetHeight)){Ext.fly(c).setHeight(a)}else{if(i>a){Ext.fly(h).setHeight(i)}}}},syncContent:function(b,h){b=Ext.fly(b,"syncDest");h=Ext.fly(h,"sycSrc");var a=this.owner,d=b.down(a.eventSelector,true),c=h.down(a.eventSelector,true),g=b.down(a.summaryRowSelector,true),e=h.down(a.summaryRowSelector,true);if(d&&c){Ext.fly(d).syncContent(c)}if(g&&e){Ext.fly(g).syncContent(e)}}}],constructor:function(){this.groupCache={};this.callParent(arguments)},init:function(b){var c=this,a=c.view;c.mixins.summary.init.call(c);c.callParent(arguments);a.headerCt.on({columnhide:c.onColumnHideShow,columnshow:c.onColumnHideShow,columnmove:c.onColumnMove,scope:c});a.addTableTpl(c.tableTpl).groupingFeature=c;a.addRowTpl(Ext.XTemplate.getTpl(c,"groupTpl")).groupingFeature=c;a.preserveScrollOnRefresh=true;if(a.store.buffered){c.collapsible=false}else{c.dataSource=a.dataSource=new Ext.grid.feature.GroupStore(c,a.store);c.startCollapsed=false}c.grid.on({reconfigure:c.onReconfigure});a.on({afterrender:c.afterViewRender,scope:c,single:true})},vetoEvent:function(a,c,d,b){if(b.type!=="mouseover"&&b.type!=="mouseout"&&b.type!=="mouseenter"&&b.type!=="mouseleave"&&b.getTarget(this.eventSelector)){return false}},enable:function(){var c=this,a=c.view,b=a.store,d;c.lastGroupField=c.getGroupField();if(c.lastGroupIndex){c.block();b.group(c.lastGroupIndex);c.unblock()}c.callParent();d=c.view.headerCt.getMenu().down("#groupToggleMenuItem");if(d){d.setChecked(true,true)}c.refreshIf()},disable:function(){var d=this,a=d.view,b=a.store,e,c;c=b.groupers.first();if(c){d.lastGroupIndex=c.property;d.block();b.clearGrouping();d.unblock()}d.callParent();e=d.view.headerCt.getMenu().down("#groupToggleMenuItem");if(e){e.setChecked(false,true)}d.refreshIf()},refreshIf:function(){var b=this.grid.ownerCt,a=this.view;if(!a.store.remoteGroup&&!this.blockRefresh){if(b&&b.lockable){b.view.refresh()}else{a.refresh()}}},afterViewRender:function(){var b=this,a=b.view;a.on({scope:b,groupclick:b.onGroupClick});if(b.enableGroupingMenu){b.injectGroupingMenu()}b.pruneGroupedHeader();b.lastGroupField=b.getGroupField();b.block();b.onGroupChange();b.unblock()},injectGroupingMenu:function(){var a=this,b=a.view.headerCt;b.showMenuBy=a.showMenuBy;b.getMenuItems=a.getMenuItems()},onColumnHideShow:function(c,g){var k=this.view,b=k.headerCt,a=b.getMenu(),e=a.down("#groupMenuItem"),l=b.getGridColumns().length,j,h,d;if(e){if(b.getVisibleGridColumns().length>1){e.enable()}else{e.disable()}}if(k.rendered){j=k.el.query("."+this.ctCls);for(d=0,h=j.length;d<h;++d){j[d].colSpan=l}}},onColumnMove:function(){var h=this,c=h.view.store,b,e,a,d,j,g;if(c.isGrouped()){b=c.getGroups();a=b.length;for(e=0;e<a;e++){d=b[e];j=d.children[0];g=d.children[d.children.length-1];c.fireEvent("update",c,j,"edit");if(g!==j){c.fireEvent("update",c,g,"edit")}}}},showMenuBy:function(b,h){var g=this.getMenu(),c=g.down("#groupMenuItem"),a=h.groupable===false||this.view.headerCt.getVisibleGridColumns().length<2?"disable":"enable",e=g.down("#groupToggleMenuItem"),d=this.view.store.isGrouped();c[a]();if(e){e.setChecked(d,true);e[d?"enable":"disable"]()}Ext.grid.header.Container.prototype.showMenuBy.apply(this,arguments)},getMenuItems:function(){var g=this,c=g.groupByText,e=g.disabled||!g.getGroupField(),a=g.showGroupsText,d=g.enableNoGroups,b=g.view.headerCt.getMenuItems;return function(){var h=b.call(this);h.push("-",{iconCls:Ext.baseCSSPrefix+"group-by-icon",itemId:"groupMenuItem",text:c,handler:g.onGroupMenuItemClick,scope:g});if(d){h.push({itemId:"groupToggleMenuItem",text:a,checked:!e,checkHandler:g.onGroupToggleMenuItemClick,scope:g})}return h}},onGroupMenuItemClick:function(c,g){var d=this,h=c.parentMenu,i=h.activeHeader,a=d.view,b=a.store;delete d.lastGroupIndex;d.block();d.enable();b.group(i.dataIndex);d.pruneGroupedHeader();d.unblock();d.refreshIf()},block:function(){this.blockRefresh=this.view.blockRefresh=true},unblock:function(){this.blockRefresh=this.view.blockRefresh=false},onGroupToggleMenuItemClick:function(a,b){this[b?"enable":"disable"]()},pruneGroupedHeader:function(){var a=this,b=a.getGroupedHeader();if(a.hideGroupedHeader&&b){Ext.suspendLayouts();if(a.prunedHeader&&a.prunedHeader!==b){a.prunedHeader.show()}a.prunedHeader=b;b.hide();Ext.resumeLayouts(true)}},getHeaderNode:function(a){return Ext.get(this.createGroupId(a))},getGroup:function(b){var a=this.groupCache,c=a[b];if(!c){c=a[b]={isCollapsed:false}}return c},isExpanded:function(a){return !this.getGroup(a).isCollapsed},expand:function(b,a){this.doCollapseExpand(false,b,a)},expandAll:function(){var d=this,a=d.view,c=d.groupCache,e,b=d.lockingPartner;for(e in c){if(c.hasOwnProperty(e)){c[e].isCollapsed=false}}Ext.suspendLayouts();a.suspendEvent("beforerefresh","refresh");d.dataSource.onRefresh();a.resumeEvent("beforerefresh","refresh");if(b){b.expandAll()}Ext.resumeLayouts(true);for(e in c){if(c.hasOwnProperty(e)){a.fireEvent("groupexpand",a,Ext.get(this.getHeaderNode(e)),e)}}},collapse:function(b,a){this.doCollapseExpand(true,b,a)},collapseAll:function(){var d=this,a=d.view,c=d.groupCache,e,b=d.lockingPartner;for(e in c){if(c.hasOwnProperty(e)){c[e].isCollapsed=true}}Ext.suspendLayouts();a.suspendEvent("beforerefresh","refresh");d.dataSource.onRefresh();a.resumeEvent("beforerefresh","refresh");if(b){b.collapseAll()}Ext.resumeLayouts(true);for(e in c){if(c.hasOwnProperty(e)){a.fireEvent("groupcollapse",a,Ext.get(this.getHeaderNode(e)),e)}}},doCollapseExpand:function(e,h,b){var d=this,a=d.view,c=d.lockingPartner,g;if(d.groupCache[h].isCollapsed!=e){d.groupCache[h].isCollapsed=e;Ext.suspendLayouts();d.dataSource.onRefresh();g=Ext.get(this.getHeaderNode(h));a.fireEvent(e?"groupcollapse":"groupexpand",a,g,h);if(c){c.doCollapseExpand(e,h,b)}Ext.resumeLayouts(true);if(b){g.up(a.getItemSelector()).scrollIntoView(a.el,null,true)}}},onGroupChange:function(){var d=this,e=d.getGroupField(),c,a,b;if(d.hideGroupedHeader){if(d.lastGroupField){c=d.getMenuItem(d.lastGroupField);if(c){c.setChecked(true)}}if(e){a=d.view.headerCt.getVisibleGridColumns();b=((a.length===1)&&(a[0].dataIndex==e));c=d.getMenuItem(e);if(c&&!b){c.setChecked(false)}}}d.refreshIf();d.lastGroupField=e},getMenuItem:function(b){var a=this.view,d=a.headerCt.down("gridcolumn[dataIndex="+b+"]"),c=a.headerCt.getMenu();return d?c.down("menuitem[headerId="+d.id+"]"):null},onGroupKey:function(c,b){var a=this,d=a.getGroupName(b.target);if(d){a.onGroupClick(a.view,b.target,d,b)}},onGroupClick:function(a,i,k,j){var h=this,d=h.groupCache,b=!h.isExpanded(k),c;if(h.collapsible){if(j.ctrlKey){Ext.suspendLayouts();for(c in d){if(c===k){if(b){h.expand(k)}}else{h.doCollapseExpand(true,c,false)}}Ext.resumeLayouts(true);return}if(b){h.expand(k)}else{h.collapse(k)}}},setupRowData:function(i,l,n){var j=this,e=j.refreshData,b=j.groupInfo,h=e.header,c=e.groupField,k=j.view.dataSource,a,m,d,g;n.isCollapsedGroup=false;n.summaryRecord=null;if(e.doGrouping){a=j.view.store.groupers.first();m=a.getGroupString(i);n.isFirstRow=l===0;if(!n.isFirstRow){d=k.getAt(l-1);if(d){n.isFirstRow=!d.isEqual(a.getGroupString(d),m)}}n.isLastRow=l==k.getTotalCount()-1;if(!n.isLastRow){g=k.getAt(l+1);if(g){n.isLastRow=!g.isEqual(a.getGroupString(g),m)}}if(n.isFirstRow){b.groupField=c;b.name=m;b.groupValue=i.get(c);b.columnName=h?h.text:c;n.collapsibleCls=j.collapsible?j.collapsibleCls:j.hdNotCollapsibleCls;n.groupId=j.createGroupId(m);if(!j.isExpanded(m)){n.itemClasses.push(j.hdCollapsedCls);n.isCollapsedGroup=true}if(k.buffered){b.rows=b.children=[]}else{b.rows=b.children=j.getRecordGroup(i).children}n.groupInfo=b}if(n.isLastRow){if(j.showSummaryRow){n.summaryRecord=e.summaryData[m]}}}},setup:function(c,d){var a=this,b=a.refreshData;a.skippedRows=0;if(d.view.bufferedRenderer){d.view.bufferedRenderer.variableRowHeight=true}b.groupField=a.getGroupField();b.header=a.getGroupedHeader(b.groupField);b.doGrouping=!a.disabled&&a.view.store.isGrouped();d.groupHeaderTpl=Ext.XTemplate.getTpl(a,"groupHeaderTpl");if(a.showSummaryRow){b.summaryData=a.generateSummaryData()}},cleanup:function(b,c){var a=this.refreshData;c.groupInfo=c.groupHeaderTpl=c.isFirstRow=null;a.groupField=a.header=null},getGroupName:function(b){var d=this,a=d.view,c=d.eventSelector,e,h,g;h=Ext.fly(b).findParent(c);if(!h){g=Ext.fly(b).findParent(a.itemSelector);if(g){h=g.down(c,true)}}if(h){e=h.id.split(a.id+"-hd-");if(e.length===2){return Ext.htmlDecode(e[1])}}},getRecordGroup:function(a){var b=this.view.store.groupers.first();if(b){return this.groupCache[b.getGroupString(a)]}},createGroupId:function(a){return this.view.id+"-hd-"+Ext.htmlEncode(a)},createGroupCls:function(a){return this.view.id+"-"+Ext.htmlEncode(a)+"-item"},getGroupField:function(){return this.view.store.getGroupField()},getGroupedHeader:function(b){var d=this,e=d.view.headerCt,c=d.lockingPartner,a,g;b=b||this.getGroupField();if(b){a="[dataIndex="+b+"]";g=e.down(a);if(!g&&c){g=c.view.headerCt.down(a)}}return g||null},getFireEventArgs:function(b,a,d,c){return[b,a,d,this.getGroupName(d),c]},destroy:function(){var a=this,b=a.dataSource;delete a.view;delete a.prunedHeader;delete a.grid;a.callParent();a.groupCache=null;if(b){b.bindStore(null)}},onReconfigure:function(d,a,c,g,b){var e=d;if(a!==g){if(a.buffered!==g.buffered){Ext.Error.raise("Cannot reconfigure grouping switching between buffered and non-buffered stores")}if(a.buffered){e.bindStore(a);e.dataSource.processStore(a)}}}});Ext.define("Ext.grid.feature.GroupingSummary",{extend:Ext.grid.feature.Grouping,alias:"feature.groupingsummary",showSummaryRow:true,vetoEvent:function(b,d,g,c){var a=this.callParent(arguments);if(a!==false){if(c.getTarget(this.summaryRowSelector)){a=false}}return a}});Ext.define("Ext.grid.feature.RowBody",{extend:Ext.grid.feature.Feature,alias:"feature.rowbody",rowBodyCls:Ext.baseCSSPrefix+"grid-row-body",rowBodyHiddenCls:Ext.baseCSSPrefix+"grid-row-body-hidden",rowBodyTdSelector:"td."+Ext.baseCSSPrefix+"grid-cell-rowbody",eventPrefix:"rowbody",eventSelector:"tr."+Ext.baseCSSPrefix+"grid-rowbody-tr",tableTpl:{before:function(b,c){var a=b.view,d=a.rowValues;if(!d.visibleColumns){d.visibleColumns=a.headerCt.getVisibleGridColumns()}this.rowBody.setup(b.rows,d)},after:function(b,c){var a=b.view,d=a.rowValues;this.rowBody.cleanup(b.rows,d)},priority:100},extraRowTpl:["{%","values.view.rowBodyFeature.setupRowData(values.record, values.recordIndex, values);","this.nextTpl.applyOut(values, out, parent);","%}",'<tr class="'+Ext.baseCSSPrefix+'grid-rowbody-tr {rowBodyCls}">','<td class="'+Ext.baseCSSPrefix+'grid-cell-rowbody" colspan="{rowBodyColspan}">','<div class="'+Ext.baseCSSPrefix+'grid-rowbody {rowBodyDivCls}">{rowBody}</div>',"</td>","</tr>",{priority:100,syncRowHeights:function(g,c){var a=this.owner,b=Ext.fly(g).down(a.eventSelector,true),h,d,e;if(b&&(h=Ext.fly(c).down(a.eventSelector,true))){if((d=b.offsetHeight)>(e=h.offsetHeight)){Ext.fly(h).setHeight(d)}else{if(e>d){Ext.fly(b).setHeight(e)}}}},syncContent:function(b,e){var a=this.owner,c=Ext.fly(b).down(a.eventSelector,true),d;if(c&&(d=Ext.fly(e).down(a.eventSelector,true))){Ext.fly(c).syncContent(d)}}}],init:function(b){var c=this,a=c.view;a.rowBodyFeature=c;if(!a.findFeature("rowwrap")){b.mon(a,{element:"el",mousedown:c.onMouseDown,scope:c});c.mon(b.getStore(),"remove",c.onStoreRemove,c)}a.headerCt.on({columnschanged:c.onColumnsChanged,scope:c});a.addTableTpl(c.tableTpl).rowBody=c;a.addRowTpl(Ext.XTemplate.getTpl(this,"extraRowTpl"));c.callParent(arguments)},onStoreRemove:function(b,d,c){var a=this.view,e;if(a.rendered){e=a.getNode(c);if(e){e=Ext.fly(e).next(this.eventSelector);if(e){e.remove()}}}},onMouseDown:function(c){var b=this,a=c.getTarget(b.eventSelector);if(a&&Ext.fly(a=a.previousSibling).is(b.view.getItemSelector())){c.target=a;b.view.handleEvent(c)}},getSelectedRow:function(a,c){var b=a.getNode(c,false);if(b){return Ext.fly(b).down(this.eventSelector)}return null},onColumnsChanged:function(d){var b=this.view.el.query(this.rowBodyTdSelector),e=d.getGridColumns().length,a=b.length,c;for(c=0;c<a;++c){b[c].colSpan=e}},setupRowData:function(a,c,b){if(this.getAdditionalData){Ext.apply(b,this.getAdditionalData(a.data,c,a,b))}},setup:function(a,b){b.rowBodyCls=this.rowBodyCls;b.rowBodyColspan=b.view.getGridColumns().length},cleanup:function(a,b){b.rowBodyCls=b.rowBodyColspan=b.rowBody=null}});Ext.define("Ext.grid.feature.RowWrap",{extend:Ext.grid.feature.Feature,alias:"feature.rowwrap",rowWrapTd:"td."+Ext.baseCSSPrefix+"grid-rowwrap",hasFeatureEvent:false,tableTpl:{before:function(a,b){if(a.view.bufferedRenderer){a.view.bufferedRenderer.variableRowHeight=true}},priority:200},wrapTpl:['<tr data-boundView="{view.id}" data-recordId="{record.internalId}" data-recordIndex="{recordIndex}" class="{[values.itemClasses.join(" ")]} '+Ext.baseCSSPrefix+'grid-wrap-row">','<td class="'+Ext.baseCSSPrefix+"grid-rowwrap "+Ext.baseCSSPrefix+'grid-td" colSpan="{columns.length}">','<table class="'+Ext.baseCSSPrefix+"{view.id}-table "+Ext.baseCSSPrefix+'grid-table" border="0" cellspacing="0" cellpadding="0">',"{[values.view.renderColumnSizer(out)]}","{%","values.itemClasses.length = 0;","this.nextTpl.applyOut(values, out, parent)","%}","</table>","</td>","</tr>",{priority:200}],init:function(a){var b=this;b.view.addTableTpl(b.tableTpl);b.view.addRowTpl(Ext.XTemplate.getTpl(b,"wrapTpl"));b.view.headerCt.on({columnhide:b.onColumnHideShow,columnshow:b.onColumnHideShow,scope:b})},onColumnHideShow:function(){var b=this.view,c=b.el.query(this.rowWrapTd),e=b.headerCt.getGridColumns().length,a=c.length,d;for(d=0;d<a;++d){c[d].colSpan=e}}});Ext.define("Ext.grid.feature.Summary",{extend:Ext.grid.feature.AbstractSummary,alias:"feature.summary",dock:undefined,dockedSummaryCls:Ext.baseCSSPrefix+"docked-summary",panelBodyCls:Ext.baseCSSPrefix+"summary-",init:function(b){var c=this,a=c.view;c.callParent(arguments);if(c.dock){b.headerCt.on({afterlayout:c.onStoreUpdate,scope:c});b.on({beforerender:function(){c.summaryBar=b.addDocked({childEls:["innerCt"],renderTpl:['<div id="{id}-innerCt">','<table cellpadding="0" class="'+c.summaryTableCls+'">','<tr class="'+c.summaryRowCls+'"></tr>',"</table>","</div>"],style:"overflow:hidden",itemId:"summaryBar",cls:[c.dockedSummaryCls,c.dockedSummaryCls+"-"+c.dock],xtype:"component",dock:c.dock,weight:10000000})[0]},afterrender:function(){b.body.addCls(c.panelBodyCls+c.dock);a.mon(a.el,{scroll:c.onViewScroll,scope:c});c.onStoreUpdate()},single:true});b.headerCt.afterComponentLayout=Ext.Function.createSequence(b.headerCt.afterComponentLayout,function(){c.summaryBar.innerCt.setWidth(this.getFullWidth()+Ext.getScrollbarSize().width)})}else{c.view.addFooterFn(c.renderTFoot)}b.on({columnmove:c.onStoreUpdate,scope:c});a.mon(a.store,{update:c.onStoreUpdate,datachanged:c.onStoreUpdate,scope:c})},renderTFoot:function(b,c){var a=b.view,d=a.findFeature("summary");if(d.showSummaryRow){c.push("<tfoot>");d.outputSummaryRecord(d.createSummaryRecord(a),b,c);c.push("</tfoot>")}},vetoEvent:function(a,c,d,b){return !b.getTarget(this.summaryRowSelector)},onViewScroll:function(){this.summaryBar.el.dom.scrollLeft=this.view.el.dom.scrollLeft},createSummaryRecord:function(a){var d=a.headerCt.getVisibleGridColumns(),h={records:a.store.getRange()},g=d.length,c,e,b=this.summaryRecord||(this.summaryRecord=new a.store.model(null,a.id+"-summary-record"));b.beginEdit();for(c=0;c<g;c++){e=d[c];if(!e.dataIndex){e.dataIndex=e.id}b.set(e.dataIndex,this.getSummary(a.store,e.summaryType,e.dataIndex,h))}b.endEdit(true);b.commit(true);b.isSummary=true;return b},onStoreUpdate:function(){var g=this,b=g.view,a=g.createSummaryRecord(b),d=b.createRowElement(a,-1),c,e,h;if(!b.rendered){return}if(g.dock){c=g.summaryBar.el.down("."+g.summaryRowCls,true)}else{c=g.view.getNode(a)}if(c){h=c.parentNode;h.insertBefore(d,c);h.removeChild(c);e=g.lockingPartner;if(e&&e.grid.rendered&&!g.calledFromLockingPartner){e.calledFromLockingPartner=true;e.onStoreUpdate();e.calledFromLockingPartner=false}}if(g.dock){g.onColumnHeaderLayout()}},onColumnHeaderLayout:function(){var b=this.view,d=b.headerCt.getGridColumns(),g,a=d.length,c,h=this.summaryBar.el,e;for(c=0;c<a;c++){g=d[c];e=h.down(b.getCellSelector(g));if(e){if(g.hidden){e.setDisplayed(false)}else{e.setDisplayed(true);e.setWidth(g.width||(g.lastBox?g.lastBox.width:100))}}}}});Ext.define("Ext.grid.locking.HeaderContainer",{extend:Ext.grid.header.Container,constructor:function(d){var c=this,a,b,e=[];c.lockable=d;c.callParent();a=c.lockable.lockedGrid.headerCt.events;for(b in a){if(a.hasOwnProperty(b)){e.push(b)}}c.relayEvents(c.lockable.lockedGrid.headerCt,e);c.relayEvents(c.lockable.normalGrid.headerCt,e)},getGridColumns:function(){return this.lockable.lockedGrid.headerCt.getGridColumns().concat(this.lockable.normalGrid.headerCt.getGridColumns())},getColumnsState:function(){var b=this,a=b.lockable.lockedGrid.headerCt.getColumnsState(),c=b.lockable.normalGrid.headerCt.getColumnsState();return a.concat(c)},applyColumnsState:function(h){var p=this,e=p.lockable.lockedGrid,g=e.headerCt,n=p.lockable.normalGrid.headerCt,q=Ext.Array.toValueMap(g.items.items,"headerId"),j=Ext.Array.toValueMap(n.items.items,"headerId"),m=[],o=[],l=1,b=h.length,k,a,d,c;for(k=0;k<b;k++){c=h[k];d=q[c.id];a=d||j[c.id];if(a){if(a.applyColumnState){a.applyColumnState(c)}if(a.locked===undefined){a.locked=!!d}if(a.locked){m.push(a);if(!a.hidden&&typeof a.width=="number"){l+=a.width}}else{o.push(a)}}}if(m.length+o.length==g.items.getCount()+n.items.getCount()){g.removeAll(false);n.removeAll(false);g.add(m);n.add(o);e.setWidth(l)}}});Ext.define("Ext.grid.locking.View",{alternateClassName:"Ext.grid.LockingView",mixins:{observable:Ext.util.Observable},isLockingView:true,eventRelayRe:/^(beforeitem|beforecontainer|item|container|cell|refresh)/,constructor:function(c){var g=this,i=[],a=g.eventRelayRe,b=c.locked.getView(),h=c.normal.getView(),d,e;Ext.apply(g,{lockedView:b,normalView:h,lockedGrid:c.locked,normalGrid:c.normal,panel:c.panel});g.mixins.observable.constructor.call(g,c);d=b.events;for(e in d){if(d.hasOwnProperty(e)&&a.test(e)){i.push(e)}}g.relayEvents(b,i);g.relayEvents(h,i);h.on({scope:g,itemmouseleave:g.onItemMouseLeave,itemmouseenter:g.onItemMouseEnter});b.on({scope:g,itemmouseleave:g.onItemMouseLeave,itemmouseenter:g.onItemMouseEnter});g.panel.on({render:g.onPanelRender,scope:g})},onPanelRender:function(){var c=this,b=c.loadMask,a={target:c.panel,msg:c.loadingText,msgCls:c.loadingCls,useMsg:c.loadingUseMsg,store:c.panel.store};c.el=c.panel.body;c.fireEvent("render",c);if(b){if(Ext.isObject(b)){a=Ext.apply(a,b)}c.loadMask=new Ext.LoadMask(a)}},getGridColumns:function(){var a=this.lockedGrid.headerCt.getGridColumns();return a.concat(this.normalGrid.headerCt.getGridColumns())},getEl:function(a){return this.getViewForColumn(a).getEl()},getViewForColumn:function(b){var a=this.lockedView,c;a.headerCt.cascade(function(d){if(d===b){c=true;return false}});return c?a:this.normalView},onItemMouseEnter:function(c,b){var g=this,d=g.lockedView,a=g.normalView,e;if(c.trackOver){if(c!==d){a=d}e=a.getNode(b,false);a.highlightItem(e)}},onItemMouseLeave:function(c,b){var e=this,d=e.lockedView,a=e.normalView;if(c.trackOver){if(c!==d){a=d}a.clearHighlight()}},relayFn:function(c,b){b=b||[];var a=this.lockedView;a[c].apply(a,b);a=this.normalView;a[c].apply(a,b)},getSelectionModel:function(){return this.panel.getSelectionModel()},getStore:function(){return this.panel.store},getNode:function(b,a){return this.normalView.getNode(b,a)},getCell:function(b,c){var a=this.getViewForColumn(c),d=a.getNode(b,true);return Ext.fly(d).down(c.getCellSelector())},indexOf:function(b){var a=this.lockedView.indexOf(b);if(!a){a=this.normalView.indexOf(b)}return a},focus:function(){var b=this.getSelectionModel().getCurrentPosition(),a=b?b.view:this.normalView;a.focus()},focusCell:function(a){a.view.focusCell(a)},isVisible:function(a){return this.panel.isVisible(a)},getRecord:function(b){var a=this.lockedView.getRecord(b);if(!a){a=this.normalView.getRecord(b)}return a},scrollBy:function(){var a=this.normalView;a.scrollBy.apply(a,arguments)},addElListener:function(a,c,b){this.relayFn("addElListener",arguments)},refreshNode:function(){this.relayFn("refreshNode",arguments)},refresh:function(){this.relayFn("refresh",arguments)},bindStore:function(){this.relayFn("bindStore",arguments)},addRowCls:function(){this.relayFn("addRowCls",arguments)},removeRowCls:function(){this.relayFn("removeRowCls",arguments)},destroy:function(){var b=this,a=b.loadMask;b.clearListeners();if(a&&a.bindStore){a.bindStore(null)}}});Ext.define("Ext.grid.locking.Lockable",{alternateClassName:"Ext.grid.Lockable",syncRowHeight:true,headerCounter:0,scrollDelta:40,lockedGridCls:Ext.baseCSSPrefix+"grid-inner-locked",unlockText:"Unlock",lockText:"Lock",bothCfgCopy:["invalidateScrollerOnRefresh","hideHeaders","enableColumnHide","enableColumnMove","enableColumnResize","sortableColumns","columnLines","rowLines"],normalCfgCopy:["verticalScroller","verticalScrollDock","verticalScrollerType","scroll"],lockedCfgCopy:[],determineXTypeToCreate:function(e){var c=this,h,d,b,g,a;if(c.subGridXType){h=c.subGridXType}else{if(!e){return"gridpanel"}d=this.getXTypes().split("/");b=d.length;g=d[b-1];a=d[b-2];if(a!=="tablepanel"){h=a}else{h=g}}return h},injectLockable:function(){this.lockable=true;this.hasView=true;var o=this,a=Ext.getScrollbarSize().width,p=o.store=Ext.StoreManager.lookup(o.store),k=o.getSelectionModel(),l,b,e,m,h,d,c,j,q,g,n;l=o.constructLockableFeatures();if(o.features){o.features=null}b=o.constructLockablePlugins();o.plugins=b.topPlugins;e=Ext.apply({id:o.id+"-locked",ownerLockable:o,xtype:o.determineXTypeToCreate(true),store:p,scrollerOwner:false,animate:false,scroll:a?false:"vertical",selModel:k,border:false,cls:o.lockedGridCls,isLayoutRoot:function(){return false},features:l.lockedFeatures,plugins:b.lockedPlugins},o.lockedGridConfig);m=Ext.apply({id:o.id+"-normal",ownerLockable:o,xtype:o.determineXTypeToCreate(),store:p,scrollerOwner:false,selModel:k,border:false,isLayoutRoot:function(){return false},features:l.normalFeatures,plugins:b.normalPlugins},o.normalGridConfig);o.addCls(Ext.baseCSSPrefix+"grid-locked");Ext.copyTo(m,o,o.bothCfgCopy,true);Ext.copyTo(e,o,o.bothCfgCopy,true);Ext.copyTo(m,o,o.normalCfgCopy,true);Ext.copyTo(e,o,o.lockedCfgCopy,true);for(h=0;h<o.normalCfgCopy.length;h++){delete o[o.normalCfgCopy[h]]}for(h=0;h<o.lockedCfgCopy.length;h++){delete o[o.lockedCfgCopy[h]]}o.addEvents("processcolumns","lockcolumn","unlockcolumn");o.addStateEvents(["lockcolumn","unlockcolumn"]);d=o.processColumns(o.columns);e.width=d.lockedWidth+Ext.num(k.headerWidth,0)+(d.locked.items.length?1:0);e.columns=d.locked;m.columns=d.normal;m.flex=1;e.viewConfig=o.lockedViewConfig||{};e.viewConfig.loadingUseMsg=false;e.viewConfig.loadMask=false;if(a){e.viewConfig.style="border-bottom:"+a+"px solid #f6f6f6;"+(e.viewConfig.style||"")}m.viewConfig=o.normalViewConfig||{};m.viewConfig.loadMask=false;Ext.applyIf(e.viewConfig,o.viewConfig);Ext.applyIf(m.viewConfig,o.viewConfig);o.lockedGrid=Ext.ComponentManager.create(e);if(o.isTree){o.lockedGrid.getView().animate=false;m.store=o.lockedGrid.view.store;m.deferRowRender=false;m.viewConfig.stripeRows=o.lockedGrid.view.stripeRows;m.rowLines=o.lockedGrid.rowLines}q=o.lockedGrid.getView();m.viewConfig.lockingPartner=q;o.normalGrid=Ext.ComponentManager.create(m);q.lockingPartner=g=o.normalGrid.getView();o.view=new Ext.grid.locking.View({loadingText:g.loadingText,loadingCls:g.loadingCls,loadingUseMsg:g.loadingUseMsg,loadMask:o.loadMask!==false,locked:o.lockedGrid,normal:o.normalGrid,panel:o});n={scroll:{fn:o.onLockedViewScroll,element:"el",scope:o}};if(a){o.lockedGrid.on({afterlayout:o.afterLockedViewLayout,scope:o});q.getOverflowStyle();if(q.scrollFlags.y){o.lockedGrid.headerCt.forceFit=true}else{n.mousewheel={fn:o.onLockedViewMouseWheel,element:"el",scope:o}}}q.on(n);n={scroll:{fn:o.onNormalViewScroll,element:"el",scope:o},scope:o};g.on(n);c=o.lockedGrid.headerCt;j=o.normalGrid.headerCt;o.headerCt=o.view.headerCt=new Ext.grid.locking.HeaderContainer(this);c.lockedCt=true;c.lockableInjected=true;j.lockableInjected=true;c.on({add:{buffer:1,scope:o,fn:o.onLockedHeaderAdd},columnshow:o.onLockedHeaderShow,columnhide:o.onLockedHeaderHide,sortchange:o.onLockedHeaderSortChange,columnresize:o.onLockedHeaderResize,scope:o});j.on({sortchange:o.onNormalHeaderSortChange,scope:o});o.modifyHeaderCt();o.items=[o.lockedGrid,o.normalGrid];o.relayHeaderCtEvents(c);o.relayHeaderCtEvents(j);o.storeRelayers=o.relayEvents(p,["filterchange"]);o.layout={type:"hbox",align:"stretch"}},getLockingViewConfig:function(){return{xclass:"Ext.grid.locking.View",locked:this.lockedGrid,normal:this.normalGrid,panel:this}},processColumns:function(h){var g=0,b=h.length,c=0,e=[],d=[],j,a;for(;g<b;++g){j=h[g];if(!j.isComponent){j=Ext.ComponentManager.create(h[g],"gridcolumn")}j.processed=true;if(j.locked||j.autoLock){if(!j.hidden){c+=this.getColumnWidth(j)||Ext.grid.header.Container.prototype.defaultWidth}e.push(j)}else{d.push(j)}if(!j.headerId){j.headerId=(j.initialConfig||j).id||("h"+(++this.headerCounter))}}a={lockedWidth:c,locked:{items:e,itemId:"lockedHeaderCt",stretchMaxPartner:"^^>>#normalHeaderCt"},normal:{items:d,itemId:"normalHeaderCt",stretchMaxPartner:"^^>>#lockedHeaderCt"}};this.fireEvent("processcolumns",this,a.lockedHeaders,a.normalHeaders);return a},getColumnWidth:function(e){var b=e.width||0,d,a,c;if(!b&&e.isGroupHeader){d=e.items.items;a=d.length;for(c=0;c<a;c++){b+=this.getColumnWidth(d[c])}}return b},afterLockedViewLayout:function(){var c=this,b=c.lockedGrid.getView(),a=b.el.dom,d=(c.normalGrid.headerCt.tooNarrow?Ext.getScrollbarSize().height:0);if(b.scrollFlags.x&&a.scrollWidth>a.clientWidth){d=0}b.el.dom.style.borderBottomWidth=d+"px";if(!Ext.isBorderBox){b.el.setHeight(b.lastBox.height)}},onLockedViewMouseWheel:function(i){var d=this,h=-d.scrollDelta,a=h*i.getWheelDeltas().y,b=d.lockedGrid.getView().el.dom,c,g;if(!d.ignoreMousewheel){if(b){c=b.scrollTop!==b.scrollHeight-b.clientHeight;g=b.scrollTop!==0}if((a<0&&g)||(a>0&&c)){i.stopEvent();b.scrollTop+=a;d.normalGrid.getView().el.dom.scrollTop=b.scrollTop;d.onNormalViewScroll()}}},onLockedViewScroll:function(){var e=this,d=e.lockedGrid.getView(),c=e.normalGrid.getView(),h=c.el.dom,g=d.el.dom,a,b;if(h.scrollTop!==g.scrollTop){h.scrollTop=g.scrollTop;if(e.store.buffered){b=d.el.child("table",true);a=c.el.child("table",true);a.style.position="absolute";a.style.top=b.style.top}}},onNormalViewScroll:function(){var e=this,d=e.lockedGrid.getView(),c=e.normalGrid.getView(),h=c.el.dom,g=d.el.dom,a,b;if(h.scrollTop!==g.scrollTop){g.scrollTop=h.scrollTop;if(e.store.buffered){b=d.el.child("table",true);a=c.el.child("table",true);b.style.position="absolute";b.style.top=a.style.top}}},syncRowHeights:function(){var e=this,a,d=e.lockedGrid.getView(),b=e.normalGrid.getView(),g=d.all.slice(),j=b.all.slice(),c=g.length,h;if(j.length===c){for(a=0;a<c;a++){b.syncRowHeights(g[a],j[a])}h=b.el.dom.scrollTop;b.el.dom.scrollTop=h;d.el.dom.scrollTop=h}},modifyHeaderCt:function(){var a=this;a.lockedGrid.headerCt.getMenuItems=a.getMenuItems(a.lockedGrid.headerCt.getMenuItems,true);a.normalGrid.headerCt.getMenuItems=a.getMenuItems(a.normalGrid.headerCt.getMenuItems,false);a.lockedGrid.headerCt.showMenuBy=Ext.Function.createInterceptor(a.lockedGrid.headerCt.showMenuBy,a.showMenuBy);a.normalGrid.headerCt.showMenuBy=Ext.Function.createInterceptor(a.normalGrid.headerCt.showMenuBy,a.showMenuBy)},onUnlockMenuClick:function(){this.unlock()},onLockMenuClick:function(){this.lock()},showMenuBy:function(b,g){var e=this.getMenu(),c=e.down("#unlockItem"),d=e.down("#lockItem"),a=c.prev();if(g.lockable===false){a.hide();c.hide();d.hide()}else{a.show();c.show();d.show();if(!c.initialConfig.disabled){c.setDisabled(g.lockable===false)}if(!d.initialConfig.disabled){d.setDisabled(!g.isLockable())}}},getMenuItems:function(g,c){var h=this,i=h.unlockText,a=h.lockText,j=Ext.baseCSSPrefix+"hmenu-unlock",b=Ext.baseCSSPrefix+"hmenu-lock",e=Ext.Function.bind(h.onUnlockMenuClick,h),d=Ext.Function.bind(h.onLockMenuClick,h);return function(){var k=g.call(this);k.push("-",{itemId:"unlockItem",cls:j,text:i,handler:e,disabled:!c});k.push({itemId:"lockItem",cls:b,text:a,handler:d,disabled:c});return k}},syncLockedWidth:function(){var e=this,b=e.lockedGrid,d=b.view,c=d.el.dom,h=e.normalGrid,g=b.headerCt.getVisibleGridColumns().length,a=h.headerCt.getVisibleGridColumns().length;Ext.suspendLayouts();if(a){h.show();if(g){if(!b.headerCt.forceFit){delete b.flex;b.setWidth(b.headerCt.getFullWidth())}b.addCls(e.lockedGridCls);b.show()}else{b.getView().refresh();b.hide()}d.el.setStyle(d.getOverflowStyle());e.ignoreMousewheel=d.scrollFlags.y}else{h.hide();c.style.borderBottomWidth="0";b.flex=1;delete b.width;b.removeCls(e.lockedGridCls);b.show();d.el.setStyle(h.view.getOverflowStyle());e.ignoreMousewheel=true}Ext.resumeLayouts(true);return[g,a]},onLockedHeaderAdd:function(){if(!this.ignoreAddLockedColumn){this.syncLockedWidth()}},onLockedHeaderResize:function(){this.syncLockedWidth()},onLockedHeaderHide:function(){this.syncLockedWidth()},onLockedHeaderShow:function(){this.syncLockedWidth()},onLockedHeaderSortChange:function(b,c,a){if(a){this.normalGrid.headerCt.clearOtherSortStates(null,true)}},onNormalHeaderSortChange:function(b,c,a){if(a){this.lockedGrid.headerCt.clearOtherSortStates(null,true)}},lock:function(c,j){var e=this,d=e.normalGrid,b=e.lockedGrid,g=d.headerCt,h=b.headerCt,i,a;c=c||g.getMenu().activeHeader;a=c.ownerCt;if(c.flex){c.width=c.getWidth();delete c.flex}Ext.suspendLayouts();a.remove(c,false);c.locked=true;e.ignoreAddLockedColumn=true;if(Ext.isDefined(j)){h.insert(j,c)}else{h.add(c)}e.ignoreAddLockedColumn=false;i=e.syncLockedWidth();if(i[0]){b.getView().refresh()}if(i[1]){d.getView().refresh()}Ext.resumeLayouts(true);e.fireEvent("lockcolumn",e,c)},unlock:function(b,e){var d=this,g=d.normalGrid,i=d.lockedGrid,h=g.headerCt,c=i.headerCt,a;if(!Ext.isDefined(e)){e=0}b=b||c.getMenu().activeHeader;Ext.suspendLayouts();b.ownerCt.remove(b,false);b.locked=false;h.insert(e,b);a=d.syncLockedWidth();if(a[0]){i.getView().refresh()}if(a[1]){g.getView().refresh()}Ext.resumeLayouts(true);d.fireEvent("unlockcolumn",d,b)},reconfigureLockable:function(a,b){var c=this,g=c.store,e=c.lockedGrid,d=c.normalGrid;Ext.suspendLayouts();if(b){e.headerCt.removeAll();d.headerCt.removeAll();b=c.processColumns(b);c.ignoreAddLockedColumn=true;e.headerCt.add(b.locked.items);c.ignoreAddLockedColumn=false;d.headerCt.add(b.normal.items);c.syncLockedWidth()}if(a&&a!==g){a=Ext.data.StoreManager.lookup(a);c.store=a;e.bindStore(a);d.bindStore(a)}else{e.getView().refresh();d.getView().refresh()}Ext.resumeLayouts(true)},constructLockableFeatures:function(){var e=this.features,c,d,g,h,b=0,a;if(e){g=[];h=[];a=e.length;for(;b<a;b++){c=e[b];if(!c.isFeature){c=Ext.create("feature."+c.ftype,c)}switch(c.lockableScope){case"locked":g.push(c);break;case"normal":h.push(c);break;default:c.lockableScope="both";g.push(c);h.push(d=c.clone());d.lockingPartner=c;c.lockingPartner=d}}}return{normalFeatures:h,lockedFeatures:g}},constructLockablePlugins:function(){var c=this.plugins,g,b,a,j,k,d,e=0,h;if(c){j=[];k=[];d=[];h=c.length;for(;e<h;e++){g=c[e];switch(g.lockableScope){case"both":k.push(a=g.clonePlugin());d.push(b=g.clonePlugin());a.lockingPartner=b;b.lockingPartner=a;Ext.destroy(g);break;case"locked":k.push(g);break;case"normal":d.push(g);break;default:j.push(g)}}}return{topPlugins:j,normalPlugins:d,lockedPlugins:k}},destroyLockable:function(){Ext.destroy(this.view)}},function(){this.borrow(Ext.AbstractComponent,["constructPlugin"])});Ext.define("Ext.tree.View",{extend:Ext.view.Table,alias:"widget.treeview",isTreeView:true,loadingCls:Ext.baseCSSPrefix+"grid-tree-loading",expandedCls:Ext.baseCSSPrefix+"grid-tree-node-expanded",leafCls:Ext.baseCSSPrefix+"grid-tree-node-leaf",expanderSelector:"."+Ext.baseCSSPrefix+"tree-expander",checkboxSelector:"."+Ext.baseCSSPrefix+"tree-checkbox",expanderIconOverCls:Ext.baseCSSPrefix+"tree-expander-over",nodeAnimWrapCls:Ext.baseCSSPrefix+"tree-animator-wrap",blockRefresh:true,loadMask:false,rootVisible:true,deferInitialRefresh:false,expandDuration:250,collapseDuration:250,toggleOnDblClick:true,stripeRows:false,uiFields:["expanded","loaded","checked","expandable","leaf","icon","iconCls","loading","qtip","qtitle"],treeRowTpl:["{%","this.processRowValues(values);","this.nextTpl.applyOut(values, out, parent);","%}",{priority:10,processRowValues:function(d){var b=d.record,a=d.view,e=b.get("qtip"),c=b.get("qttle");d.rowAttr={};if(e){d.rowAttr["data-qtip"]=e}if(c){d.rowAttr["data-qtitle"]=c}if(b.isExpanded()){d.rowClasses.push(a.expandedCls)}if(b.isLeaf()){d.rowClasses.push(a.leafCls)}if(b.isLoading()){d.rowClasses.push(a.loadingCls)}}}],initComponent:function(){var b=this,c=b.panel.getStore(),a=b.store;if(b.initialConfig.animate===undefined){b.animate=Ext.enableFx}if(!a||a===c){b.store=a=new Ext.data.NodeStore({treeStore:c,recursive:true,rootVisible:b.rootVisible})}if(b.node){b.setRootNode(b.node)}b.animQueue={};b.animWraps={};b.addEvents("afteritemexpand","afteritemcollapse","nodedragover");b.callParent(arguments);b.addRowTpl(Ext.XTemplate.getTpl(b,"treeRowTpl"))},onBeforeFill:function(b,a){this.store.suspendEvents()},onFillComplete:function(e,d,b){var c=this,a=c.store,g=a.indexOf(b[0]);a.resumeEvents();d.triggerUIUpdate();if(!b.length||g===-1){return}c.onAdd(c.store,b,g);c.refreshPartner()},onBeforeSort:function(){this.store.suspendEvents()},onSort:function(a){if(a.isStore){this.store.resumeEvents();this.refresh();this.refreshPartner()}},refreshPartner:function(){var a=this.lockingPartner;if(a){a.refresh()}},getMaskStore:function(){return this.panel.getStore()},afterRender:function(){var a=this;a.callParent(arguments);a.el.on({scope:a,delegate:a.expanderSelector,mouseover:a.onExpanderMouseOver,mouseout:a.onExpanderMouseOut,click:{delegate:a.checkboxSelector,fn:a.onCheckboxChange,scope:a}})},afterComponentLayout:function(){this.callParent(arguments);var a=this.stretcher;if(a){a.setWidth((this.getWidth()-Ext.getScrollbarSize().width))}},processUIEvent:function(a){if(a.getTarget("."+this.nodeAnimWrapCls,this.el)){return false}return this.callParent(arguments)},onClear:function(){this.store.removeAll()},setRootNode:function(b){var a=this;a.store.setNode(b);a.node=b},onCheckboxChange:function(d,a){var c=this,b=d.getTarget(c.getItemSelector(),c.getTargetEl());if(b){c.onCheckChange(c.getRecord(b))}},onCheckChange:function(a){var b=a.get("checked");if(Ext.isBoolean(b)){b=!b;a.set("checked",b);this.fireEvent("checkchange",a,b)}},getChecked:function(){var a=[];this.node.cascadeBy(function(b){if(b.get("checked")){a.push(b)}});return a},isItemChecked:function(a){return a.get("checked")},createAnimWrap:function(a,b){var g=this,e=g.getNode(a),d,c,h=[];g.renderColumnSizer(h);c=Ext.get(e);d=c.insertSibling({tag:"tr",html:['<td colspan="'+g.panel.headerCt.getColumnCount()+'">','<div class="'+g.nodeAnimWrapCls+'">','<table class="'+Ext.baseCSSPrefix+g.id+"-table "+Ext.baseCSSPrefix+'grid-table" border="0" cellspacing="0" cellpadding="0">',h.join(""),"<tbody></tbody></table>","</div>","</td>"].join("")},"after");return{record:a,node:e,el:d,expanding:false,collapsing:false,animating:false,animateEl:d.down("div"),targetEl:d.down("tbody")}},getAnimWrap:function(d,a){if(!this.animate){return null}var b=this.animWraps,c=b[d.internalId];if(a!==false){while(!c&&d){d=d.parentNode;if(d){c=b[d.internalId]}}}return c},doAdd:function(c,h){var i=this,a=i.bufferRender(c,h,true),e=c[0],j=e.parentNode,k=i.all,m,d=i.getAnimWrap(j),l,b,g;if(!d||!d.expanding){return i.callParent(arguments)}j=d.record;l=d.targetEl;b=l.dom.childNodes;g=b.length;m=h-i.indexInStore(j)-1;if(!g||m>=g){l.appendChild(a)}else{Ext.fly(b[m]).insertSibling(a,"before",true)}k.insert(h,a);if(d.isAnimating){i.onExpand(j)}},beginBulkUpdate:function(){if(this.rendered){Ext.suspendLayouts()}},endBulkUpdate:function(){if(this.rendered){this.refreshSize();Ext.resumeLayouts(true)}},onRemove:function(g,a,b){var d=this,e,c;if(d.viewReady){e=d.store.getCount()===0;if(e){d.refresh()}else{for(c=b.length-1;c>=0;--c){d.doRemove(a[c],b[c])}}if(d.hasListeners.itemremove){for(c=b.length-1;c>=0;--c){d.fireEvent("itemremove",a[c],b[c])}}}},doRemove:function(a,c){var h=this,d=h.all,b=h.getAnimWrap(a),g=d.item(c),e=g?g.dom:null;if(!e||!b||!b.collapsing){return h.callParent(arguments)}b.targetEl.dom.insertBefore(e,b.targetEl.dom.firstChild);d.removeElement(c)},onBeforeExpand:function(d,b,c){var e=this,a;if(e.rendered&&e.all.getCount()&&e.animate){if(e.getNode(d)){a=e.getAnimWrap(d,false);if(!a){a=e.animWraps[d.internalId]=e.createAnimWrap(d);a.animateEl.setHeight(0)}else{if(a.collapsing){a.targetEl.select(e.itemSelector).remove()}}a.expanding=true;a.collapsing=false}}},onExpand:function(j){var i=this,g=i.animQueue,a=j.getId(),c=i.getNode(j),h=c?i.indexOf(c):-1,e,b,k,d=Ext.isIEQuirks?1:0;if(i.singleExpand){i.ensureSingleExpand(j)}if(h===-1){return}e=i.getAnimWrap(j,false);if(!e){j.isExpandingOrCollapsing=false;i.fireEvent("afteritemexpand",j,h,c);i.refreshSize();return}b=e.animateEl;k=e.targetEl;b.stopAnimation();g[a]=true;b.dom.style.height=d+"px";b.animate({from:{height:d},to:{height:k.getHeight()},duration:i.expandDuration,listeners:{afteranimate:function(){var l=k.query(i.itemSelector);if(l.length){e.el.insertSibling(l,"before",true)}e.el.remove();i.refreshSize();delete i.animWraps[e.record.internalId];delete g[a]}},callback:function(){j.isExpandingOrCollapsing=false;i.fireEvent("afteritemexpand",j,h,c)}});e.isAnimating=true},onBeforeCollapse:function(e,b,c,h,d){var g=this,a;if(g.rendered&&g.all.getCount()){if(g.animate){if(Ext.Array.contains(e.stores,g.store)){a=g.getAnimWrap(e);if(!a){a=g.animWraps[e.internalId]=g.createAnimWrap(e,c)}else{if(a.expanding){a.targetEl.select(this.itemSelector).remove()}}a.expanding=false;a.collapsing=true;a.callback=h;a.scope=d}}else{g.onCollapseCallback=h;g.onCollapseScope=d}}},onCollapse:function(d){var g=this,a=g.animQueue,i=d.getId(),e=g.getNode(d),c=e?g.indexOf(e):-1,b=g.getAnimWrap(d),h;if(!g.all.getCount()||!Ext.Array.contains(d.stores,g.store)){return}if(!b){d.isExpandingOrCollapsing=false;g.fireEvent("afteritemcollapse",d,c,e);g.refreshSize();Ext.callback(g.onCollapseCallback,g.onCollapseScope);g.onCollapseCallback=g.onCollapseScope=null;return}h=b.animateEl;a[i]=true;h.stopAnimation();h.animate({to:{height:Ext.isIEQuirks?1:0},duration:g.collapseDuration,listeners:{afteranimate:function(){b.el.remove();g.refreshSize();delete g.animWraps[b.record.internalId];delete a[i]}},callback:function(){d.isExpandingOrCollapsing=false;g.fireEvent("afteritemcollapse",d,c,e);Ext.callback(b.callback,b.scope);b.callback=b.scope=null}});b.isAnimating=true},isAnimating:function(a){return !!this.animQueue[a.getId()]},expand:function(d,c,h,e){var g=this,b=!!g.animate,a;if(!b||!d.isExpandingOrCollapsing){if(!d.isLeaf()){d.isExpandingOrCollapsing=b}Ext.suspendLayouts();a=d.expand(c,h,e);Ext.resumeLayouts(true);return a}},collapse:function(c,b,g,d){var e=this,a=!!e.animate;if(!a||!c.isExpandingOrCollapsing){if(!c.isLeaf()){c.isExpandingOrCollapsing=a}return c.collapse(b,g,d)}},toggle:function(b,a,d,c){if(b.isExpanded()){this.collapse(b,a,d,c)}else{this.expand(b,a,d,c)}},onItemDblClick:function(a,e,c){var d=this,b=d.editingPlugin;d.callParent(arguments);if(d.toggleOnDblClick&&a.isExpandable()&&!(b&&b.clicksToEdit===2)){d.toggle(a)}},onBeforeItemMouseDown:function(a,c,b,d){if(d.getTarget(this.expanderSelector,c)){return false}return this.callParent(arguments)},onItemClick:function(a,c,b,d){if(d.getTarget(this.expanderSelector,c)&&a.isExpandable()){this.toggle(a,d.ctrlKey);return false}return this.callParent(arguments)},onExpanderMouseOver:function(b,a){b.getTarget(this.cellSelector,10,true).addCls(this.expanderIconOverCls)},onExpanderMouseOut:function(b,a){b.getTarget(this.cellSelector,10,true).removeCls(this.expanderIconOverCls)},getStoreListeners:function(){var b=this,a=b.callParent(arguments);return Ext.apply(a,{beforeexpand:b.onBeforeExpand,expand:b.onExpand,beforecollapse:b.onBeforeCollapse,collapse:b.onCollapse,write:b.onStoreWrite,datachanged:b.onStoreDataChanged})},onBindStore:function(){var a=this,b=a.getTreeStore();a.callParent(arguments);a.mon(b,{scope:a,beforefill:a.onBeforeFill,fillcomplete:a.onFillComplete,beforebulkremove:a.beginBulkUpdate,bulkremovecomplete:a.endBulkUpdate});if(!b.remoteSort){a.mon(b,{scope:a,beforesort:a.onBeforeSort,sort:a.onSort})}},onUnbindStore:function(){var a=this,b=a.getTreeStore();a.callParent(arguments);a.mun(b,{scope:a,beforefill:a.onBeforeFill,fillcomplete:a.onFillComplete,beforebulkremove:a.beginBulkUpdate,bulkremovecomplete:a.endBulkUpdate});if(!b.remoteSort){a.mun(b,{scope:a,beforesort:a.onBeforeSort,sort:a.onSort})}},getTreeStore:function(){return this.panel.store},ensureSingleExpand:function(b){var a=b.parentNode;if(a){a.eachChild(function(c){if(c!==b&&c.isExpanded()){c.collapse()}})}},shouldUpdateCell:function(b,e,d){if(d){var c=0,a=d.length;for(;c<a;++c){if(Ext.Array.contains(this.uiFields,d[c])){return true}}}return this.callParent(arguments)},onStoreWrite:function(b,a){var c=this.panel.store;c.fireEvent("write",c,a)},onStoreDataChanged:function(b,a){var c=this.panel.store;c.fireEvent("datachanged",c)}});Ext.define("Ext.grid.plugin.BufferedRendererTreeView",{override:"Ext.tree.View",onRemove:function(b,a,c){if(this.bufferedRenderer){this.onDataRefresh()}else{this.callParent([b,a,c])}}});Ext.define("Ext.grid.plugin.BufferedRenderer",{extend:Ext.AbstractPlugin,alias:"plugin.bufferedrenderer",lockableScope:"both",percentageFromEdge:0.35,variableRowHeight:false,numFromEdge:8,trailingBufferZone:10,leadingBufferZone:20,synchronousRender:true,scrollToLoadBuffer:200,viewSize:0,rowHeight:21,tableStart:0,tableEnd:0,position:0,lastScrollDirection:1,bodyTop:0,init:function(c){var d=this,a=c.view,b={scroll:{fn:d.onViewScroll,element:"el",scope:d},boxready:d.onViewResize,resize:d.onViewResize,refresh:d.onViewRefresh,scope:d,destroyable:true};if(!d.variableRowHeight&&c.ownerLockable){c.ownerLockable.syncRowHeight=false}if(c.isTree||c.ownerLockable&&c.ownerLockable.isTree){a.blockRefresh=false;a.loadMask=true}if(a.positionBody){b.refresh=d.onViewRefresh}d.grid=c;d.view=a;a.bufferedRenderer=d;a.preserveScrollOnRefresh=true;d.bindStore(a.dataSource);a.getViewRange=function(){return d.getViewRange()};d.position=0;d.gridListeners=c.on("reconfigure",d.onReconfigure,d);d.viewListeners=a.on(b)},bindStore:function(a){var b=this;if(b.store){b.unbindStore()}b.storeListeners=a.on({scope:b,clear:b.onStoreClear,destroyable:true});b.store=a;if(b.view.componentLayout.layoutCount){b.onViewResize(b.view,0,b.view.getHeight())}},onReconfigure:function(b,a){if(a&&a!==this.store){this.bindStore(a)}},unbindStore:function(){this.storeListeners.destroy();delete this.view.getStoreListeners;this.store=null},onStoreClear:function(){var a=this;if(a.view.rendered&&!a.store.isDestroyed){if(a.scrollTop!==0){a.ignoreNextScrollEvent=true;a.view.el.dom.scrollTop=a.bodyTop=a.scrollTop=0}a.position=0;delete a.lastScrollDirection;delete a.scrollOffset;delete a.rowHeight}},onViewRefresh:function(){var b=this,a=b.view;if(b.scrollTop!==a.el.dom.scrollTop){b.onViewScroll()}else{b.setBodyTop(b.bodyTop);if(a.all.getCount()){b.viewSize=0;b.onViewResize(a,null,a.getHeight())}}},onViewResize:function(d,g,b,c,i){if(!i||b!==i){var h=this,e,a;if(d.all.getCount()){delete h.rowHeight}a=h.getScrollHeight();e=Math.ceil(b/h.rowHeight)+h.trailingBufferZone+h.leadingBufferZone;h.viewSize=h.setViewSize(e);h.stretchView(d,a)}},stretchView:function(b,a){var e=this,d=(e.store.buffered?e.store.getTotalCount():e.store.getCount());if(e.stretcher){e.stretcher.dom.style.marginTop=(a-1)+"px"}else{var c=b.el;if(b.refreshCounter){b.fixedNodes++}if(d&&(e.view.all.endIndex===d-1)){a=e.bodyTop+b.body.dom.offsetHeight}this.stretcher=c.createChild({style:{width:"1px",height:"1px",marginTop:(a-1)+"px",left:0,position:"absolute"}},c.dom.firstChild)}},setViewSize:function(g){if(g!==this.viewSize){this.scrollTop=this.view.el.dom.scrollTop;var d=this,b=d.store,c=d.view.all.getCount(),e,a;d.viewSize=b.viewSize=g;if(c){e=d.view.all.startIndex;a=Math.min(e+g-1,(b.buffered?b.getTotalCount():b.getCount())-1);d.renderRange(e,a)}}return g},getViewRange:function(){var b=this,c=b.view.all,a=b.store;if(a.data.getCount()){return a.getRange(c.startIndex,c.startIndex+(b.viewSize||b.store.defaultViewSize)-1)}else{return[]}},scrollTo:function(j,c,m,o){var g=this,i=g.view,n=i.el.dom,k=g.store,h=k.buffered?k.getTotalCount():k.getCount(),e,b,d,a,l;j=Math.min(Math.max(j,0),h-1);e=Math.max(Math.min(j-((g.leadingBufferZone+g.trailingBufferZone)/2),h-g.viewSize+1),0);l=e*g.rowHeight;b=Math.min(e+g.viewSize-1,h-1);k.getRange(e,b,{callback:function(q,r,p){g.renderRange(r,p,true);d=k.data.getRange(j,j)[0];a=i.getNode(d,false);i.body.dom.style.top=l+"px";g.position=g.scrollTop=n.scrollTop=l=Math.min(Math.max(0,l-i.body.getOffsetsTo(a)[1]),n.scrollHeight-n.clientHeight);if(Ext.isIE){n.scrollTop=l}if(c){i.selModel.select(d)}if(m){m.call(o||g,j,d)}}})},onViewScroll:function(g,a){var c=this,b,h,d=c.view.el.dom.scrollTop;if(c.ignoreNextScrollEvent){c.ignoreNextScrollEvent=false;return}if(!c.disabled){b=d-c.position;h=b>0?1:-1;c.scrollTop=d;if(Math.abs(b)>=20||(h!==c.lastScrollDirection)){c.position=d;c.lastScrollDirection=h;c.handleViewScroll(c.lastScrollDirection)}}},handleViewScroll:function(h){var e=this,g=e.view.all,b=e.store,i=e.viewSize,a=(b.buffered?b.getTotalCount():b.getCount()),d,c;if(a>=i){if(h==-1){if(g.startIndex){if((e.getFirstVisibleRowIndex()-g.startIndex)<e.numFromEdge){d=Math.max(0,e.getLastVisibleRowIndex()+e.trailingBufferZone-i)}}}else{if(g.endIndex<a-1){if((g.endIndex-e.getLastVisibleRowIndex())<e.numFromEdge){d=Math.max(0,e.getFirstVisibleRowIndex()-e.trailingBufferZone)}}}if(d!==undefined){c=Math.min(d+i-1,a-1);if(d!==g.startIndex||c!==g.endIndex){e.renderRange(d,c)}}}},renderRange:function(e,a,d){var c=this,b=c.store;if(b.rangeCached(e,a)){c.cancelLoad();if(c.synchronousRender||d){c.onRangeFetched(null,e,a)}else{if(!c.renderTask){c.renderTask=new Ext.util.DelayedTask(c.onRangeFetched,c,null,false)}c.renderTask.delay(1,null,null,[null,e,a])}}else{c.attemptLoad(e,a)}},onRangeFetched:function(g,a,d){var h=this,j=h.view,c,l=j.all,b,k=0,e=a*h.rowHeight,i;if(j.isDestroyed){return}if(!g){g=h.store.getRange(a,d);if(!g){return}}if(a>l.endIndex||d<l.startIndex){l.clear(true);i=e}if(!l.getCount()){j.doAdd(g,a)}else{if(d>l.endIndex){b=Math.max(a-l.startIndex,0);if(h.variableRowHeight){k=l.item(l.startIndex+b,true).offsetTop}l.scroll(Ext.Array.slice(g,l.endIndex+1-a),1,b,a,d);if(h.variableRowHeight){i=h.bodyTop+k}else{i=e}}else{b=Math.max(l.endIndex-d,0);c=l.startIndex;l.scroll(Ext.Array.slice(g,0,l.startIndex-a),-1,b,a,d);if(h.variableRowHeight){i=h.bodyTop-l.item(c,true).offsetTop}else{i=e}}}if(j.positionBody){h.setBodyTop(i,e)}},setBodyTop:function(d,g){var e=this,b=e.view,c=e.store,a=b.body.dom,h;d=Math.floor(d);if(g!==undefined){h=d-g;d=g}a.style.position="absolute";a.style.top=(e.bodyTop=d)+"px";if(h){e.scrollTop=e.position=b.el.dom.scrollTop-=h}if(e.view.all.endIndex===(c.buffered?c.getTotalCount():c.getCount())-1){e.stretchView(b,e.bodyTop+a.offsetHeight)}},getFirstVisibleRowIndex:function(j,c,b,g){var h=this,i=h.view,l=i.all,a=l.elements,d=i.el.dom.clientHeight,e,k;if(l.getCount()&&h.variableRowHeight){if(!arguments.length){j=l.startIndex;c=l.endIndex;b=h.scrollTop;g=b+d;if(h.bodyTop>g||h.bodyTop+i.body.getHeight()<b){return Math.floor(h.scrollTop/h.rowHeight)}e=j+Math.min(h.numFromEdge+((h.lastScrollDirection==-1)?h.leadingBufferZone:h.trailingBufferZone),Math.floor((c-j)/2))}else{e=j+Math.floor((c-j)/2)}k=h.bodyTop+a[e].offsetTop;if(k+a[e].offsetHeight<b){return h.getFirstVisibleRowIndex(e+1,c,b,g)}if(k<=b){return e}else{if(e!==j){return h.getFirstVisibleRowIndex(j,e-1,b,g)}}}return Math.floor(h.scrollTop/h.rowHeight)},getLastVisibleRowIndex:function(k,c,b,g){var i=this,j=i.view,m=j.all,a=m.elements,d=j.el.dom.clientHeight,e,l,h;if(m.getCount()&&i.variableRowHeight){if(!arguments.length){k=m.startIndex;c=m.endIndex;b=i.scrollTop;g=b+d;if(i.bodyTop>g||i.bodyTop+j.body.getHeight()<b){return Math.floor(i.scrollTop/i.rowHeight)+Math.ceil(d/i.rowHeight)}e=c-Math.min(i.numFromEdge+((i.lastScrollDirection==1)?i.leadingBufferZone:i.trailingBufferZone),Math.floor((c-k)/2))}else{e=k+Math.floor((c-k)/2)}l=i.bodyTop+a[e].offsetTop;if(l>g){return i.getLastVisibleRowIndex(k,e-1,b,g)}h=l+a[e].offsetHeight;if(h>=g){return e}else{if(e!==c){return i.getLastVisibleRowIndex(e+1,c,b,g)}}}return i.getFirstVisibleRowIndex()+Math.ceil(d/i.rowHeight)},getScrollHeight:function(){var d=this,a=d.view,b=d.store,c=!d.hasOwnProperty("rowHeight"),e=d.store.getCount();if(!e){return 0}if(c){if(a.all.getCount()){d.rowHeight=Math.floor(a.body.getHeight()/a.all.getCount())}}return Math.floor((b.buffered?b.getTotalCount():b.getCount())*d.rowHeight)},attemptLoad:function(c,a){var b=this;if(b.scrollToLoadBuffer){if(!b.loadTask){b.loadTask=new Ext.util.DelayedTask(b.doAttemptLoad,b,[])}b.loadTask.delay(b.scrollToLoadBuffer,b.doAttemptLoad,b,[c,a])}else{b.store.getRange(c,a,{callback:b.onRangeFetched,scope:b,fireEvent:false})}},cancelLoad:function(){if(this.loadTask){this.loadTask.cancel()}},doAttemptLoad:function(b,a){this.store.getRange(b,a,{callback:this.onRangeFetched,scope:this,fireEvent:false})},destroy:function(){var b=this,a=b.view;if(a&&a.el){a.el.un("scroll",b.onViewScroll,b)}Ext.destroy(b.viewListeners,b.storeListeners,b.gridListeners)}});Ext.define("Ext.grid.plugin.Editing",{alias:"editing.editing",extend:Ext.AbstractPlugin,mixins:{observable:Ext.util.Observable},clicksToEdit:2,triggerEvent:undefined,relayedEvents:["beforeedit","edit","validateedit","canceledit"],defaultFieldXType:"textfield",editStyle:"",constructor:function(a){var b=this;b.addEvents("beforeedit","edit","validateedit","canceledit");b.callParent(arguments);b.mixins.observable.constructor.call(b);b.on("edit",function(c,d){b.fireEvent("afteredit",c,d)})},init:function(a){var b=this;b.grid=a;b.view=a.view;b.initEvents();b.mon(a,{reconfigure:b.onReconfigure,scope:b,beforerender:{fn:b.onReconfigure,single:true,scope:b}});a.relayEvents(b,b.relayedEvents);if(b.grid.ownerLockable){b.grid.ownerLockable.relayEvents(b,b.relayedEvents)}a.isEditable=true;a.editingPlugin=a.view.editingPlugin=b},onReconfigure:function(){var a=this.grid;a=a.ownerLockable?a.ownerLockable:a;this.initFieldAccessors(a.getView().getGridColumns())},destroy:function(){var b=this,a=b.grid;Ext.destroy(b.keyNav);b.clearListeners();if(a){b.removeFieldAccessors(a.getView().getGridColumns());a.editingPlugin=a.view.editingPlugin=b.grid=b.view=b.editor=b.keyNav=null}},getEditStyle:function(){return this.editStyle},initFieldAccessors:function(a){a=[].concat(a);var d=this,g,e=a.length,b;for(g=0;g<e;g++){b=a[g];Ext.applyIf(b,{getEditor:function(c,h){return d.getColumnField(this,h)},setEditor:function(c){d.setColumnField(this,c)}})}},removeFieldAccessors:function(a){a=[].concat(a);var e,d=a.length,b;for(e=0;e<d;e++){b=a[e];delete b.getEditor;delete b.setEditor}},getColumnField:function(b,a){var c=b.field;if(!c&&b.editor){c=b.editor;delete b.editor}if(!c&&a){c=a}if(c){if(Ext.isString(c)){c={xtype:c}}if(!c.isFormField){c=Ext.ComponentManager.create(c,this.defaultFieldXType)}b.field=c;Ext.apply(c,{name:b.dataIndex});return c}},setColumnField:function(a,b){if(Ext.isObject(b)&&!b.isFormField){b=Ext.ComponentManager.create(b,this.defaultFieldXType)}a.field=b},initEvents:function(){var a=this;a.initEditTriggers();a.initCancelTriggers()},initCancelTriggers:Ext.emptyFn,initEditTriggers:function(){var b=this,a=b.view;if(b.triggerEvent=="cellfocus"){b.mon(a,"cellfocus",b.onCellFocus,b)}else{if(b.triggerEvent=="rowfocus"){b.mon(a,"rowfocus",b.onRowFocus,b)}else{if(a.getSelectionModel().isCellModel){a.onCellFocus=Ext.Function.bind(b.beforeViewCellFocus,b)}b.mon(a,b.triggerEvent||("cell"+(b.clicksToEdit===1?"click":"dblclick")),b.onCellClick,b)}}b.initAddRemoveHeaderEvents();a.on("render",b.initKeyNavHeaderEvents,b,{single:true})},beforeViewCellFocus:function(a){if(this.view.selModel.keyNavigation||!this.editing||!this.isCellEditable||!this.isCellEditable(a.row,a.columnHeader)){this.view.focusCell.apply(this.view,arguments)}},onRowFocus:function(a,c,b){this.startEdit(c,0)},onCellFocus:function(c,b,a){this.startEdit(a.row,a.column)},onCellClick:function(c,a,i,b,h,d,g){if(!c.expanderSelector||!g.getTarget(c.expanderSelector)){this.startEdit(b,c.getHeaderAtIndex(i))}},initAddRemoveHeaderEvents:function(){var a=this;a.mon(a.grid.headerCt,{scope:a,add:a.onColumnAdd,remove:a.onColumnRemove})},initKeyNavHeaderEvents:function(){var a=this;a.keyNav=Ext.create("Ext.util.KeyNav",a.view.el,{enter:a.onEnterKey,esc:a.onEscKey,scope:a})},onColumnAdd:function(a,b){if(b.isHeader){this.initFieldAccessors(b)}},onColumnRemove:function(a,b){if(b.isHeader){this.removeFieldAccessors(b)}},onEnterKey:function(h){var d=this,c=d.grid,b=c.getSelectionModel(),a,i,g=c.headerCt.getHeaderAtIndex(0);if(b.getCurrentPosition){i=b.getCurrentPosition();if(i){a=c.getView().getStore().getAt(i.row);g=c.headerCt.getHeaderAtIndex(i.column)}}else{a=b.getLastSelected()}if(a&&g){d.startEdit(a,g)}},onEscKey:function(a){return this.cancelEdit()},beforeEdit:Ext.emptyFn,startEdit:function(b,e){var d=this,c,a=d.grid.lockable?d.grid:d.view;if(!a.componentLayoutCounter){a.on({boxready:Ext.Function.bind(d.startEdit,d,[b,e]),single:true});return false}if(d.grid.collapsed||!d.grid.view.isVisible(true)){return false}c=d.getEditingContext(b,e);if(c==null||d.beforeEdit(c)===false||d.fireEvent("beforeedit",d,c)===false||c.cancel){return false}d.editing=true;return c},getEditingContext:function(c,h){var g=this,d=g.grid,b=d.getView(),a=b.getNode(c,true),e,i;if(!a){return}h=d.headerCt.getVisibleHeaderClosestToIndex(Ext.isNumber(h)?h:h.getIndex());if(!h){return}i=h.getIndex();if(Ext.isNumber(c)){e=c;c=b.getRecord(a)}else{e=b.indexOf(a)}if(!c){return}return{grid:d,record:c,field:h.dataIndex,value:c.get(h.dataIndex),row:a,column:h,rowIdx:e,colIdx:i}},cancelEdit:function(){var a=this;a.editing=false;a.fireEvent("canceledit",a,a.context)},completeEdit:function(){var a=this;if(a.editing&&a.validateEdit()){a.fireEvent("edit",a,a.context)}a.context=null;a.editing=false},validateEdit:function(){var b=this,a=b.context;return b.fireEvent("validateedit",b,a)!==false&&!a.cancel}});Ext.define("Ext.grid.plugin.CellEditing",{alias:"plugin.cellediting",extend:Ext.grid.plugin.Editing,lockableScope:"both",init:function(a){var c=this,b=c.lockingPartner;c.callParent(arguments);if(b){if(b.editors){c.editors=b.editors;c.editTask=b.editTask}else{c.editors=b.editors=new Ext.util.MixedCollection(false,function(d){return d.editorId});c.editTask=b.editTask=new Ext.util.DelayedTask()}}else{c.editors=new Ext.util.MixedCollection(false,function(d){return d.editorId});c.editTask=new Ext.util.DelayedTask()}},onReconfigure:function(c,a,b){if(b){this.editors.clear()}this.callParent()},destroy:function(){var a=this;if(a.editors){a.editTask.cancel();a.editors.each(Ext.destroy,Ext);a.editors.clear()}a.callParent(arguments)},onBodyScroll:function(){var c=this,b=c.getActiveEditor(),a=c.view.el.getScroll();if(b&&b.editing&&b.editingPlugin===c){if(a.top!==c.scroll.top){if(b.field){if(b.field.triggerBlur){b.field.triggerBlur()}else{b.field.blur()}}}else{b.realign()}}c.scroll=a},initCancelTriggers:function(){var c=this,b=c.grid,a=b.view;c.mon(a,"bodyscroll",c.onBodyScroll,c);c.mon(b,{columnresize:c.cancelEdit,columnmove:c.cancelEdit,scope:c})},isCellEditable:function(a,d){var c=this,b=c.getEditingContext(a,d);if(c.grid.view.isVisible(true)&&b){d=b.column;a=b.record;if(d&&c.getEditor(a,d)){return true}}},startEdit:function(a,e,c){var d=this,b;c=c||d.callParent(arguments);d.completeEdit();if(c&&d.grid.view.isVisible(true)){d.context=c;a=c.record;e=c.column;if(e&&!e.getEditor(a)){return false}c.originalValue=c.value=a.get(e.dataIndex);if(d.beforeEdit(c)===false||d.fireEvent("beforeedit",d,c)===false||c.cancel){return false}b=d.getEditor(a,e);d.grid.view.cancelFocus();d.view.focusCell({row:c.rowIdx,column:c.colIdx});if(b){d.editTask.delay(15,d.showEditor,d,[b,c,c.value]);return true}return false}},showEditor:function(e,a,h){var g=this,d=a.record,c=a.column,b=g.grid.getSelectionModel(),i=b.getCurrentPosition(),j=i&&i.view;if(j&&j!==g.view){return g.lockingPartner.showEditor(e,g.lockingPartner.getEditingContext(i.record,i.columnHeader),h)}g.setEditingContext(a);g.setActiveEditor(e);g.setActiveRecord(d);g.setActiveColumn(c);if(b.selectByPosition&&(!i||i.column!==a.colIdx||i.row!==a.rowIdx)){b.selectByPosition({row:a.rowIdx,column:a.colIdx,view:g.view})}e.startEdit(g.getCell(d,c),h,a);g.editing=true;g.scroll=g.view.el.getScroll()},completeEdit:function(){var a=this.getActiveEditor();if(a){a.completeEdit();this.editing=false}},setEditingContext:function(a){this.context=a;if(this.lockingPartner){this.lockingPartner.context=a}},setActiveEditor:function(a){this.activeEditor=a;if(this.lockingPartner){this.lockingPartner.activeEditor=a}},getActiveEditor:function(){return this.activeEditor},setActiveColumn:function(a){this.activeColumn=a;if(this.lockingPartner){this.lockingPartner.activeColumn=a}},getActiveColumn:function(){return this.activeColumn},setActiveRecord:function(a){this.activeRecord=a;if(this.lockingPartner){this.lockingPartner.activeRecord=a}},getActiveRecord:function(){return this.activeRecord},getEditor:function(a,e){var h=this,g=h.editors,d=e.getItemId(),c=g.getByKey(d),b=h.grid.ownerLockable||h.grid;if(!c){c=e.getEditor(a);if(!c){return false}if(c instanceof Ext.grid.CellEditor){c.floating=true;c.isForTree=h.grid.isTree}else{c=new Ext.grid.CellEditor({floating:true,editorId:d,field:c,isForTree:h.grid.isTree})}b.add(c);c.on({scope:h,specialkey:h.onSpecialKey,complete:h.onEditComplete,canceledit:h.cancelEdit});e.on("removed",h.cancelActiveEdit,h);g.add(c)}c.editingPlugin=h;return c},cancelActiveEdit:function(b){var a=this.context;if(a&&a.column===b){this.cancelEdit()}},setColumnField:function(b,c){var a=this.editors.getByKey(b.getItemId());Ext.destroy(a,b.field);this.editors.removeAtKey(b.getItemId());this.callParent(arguments)},getCell:function(a,b){return this.grid.getView().getCell(a,b)},onSpecialKey:function(a,c,b){var d;if(b.getKey()===b.TAB){b.stopEvent();if(a){a.onEditorTab(b)}d=a.up("tablepanel").getSelectionModel();if(d.onEditorTab){return d.onEditorTab(a.editingPlugin,b)}}},onEditComplete:function(h,j,d){var i=this,a=i.grid,b=i.getActiveColumn(),e=a.getSelectionModel(),c=i.context,g;if(b){g=c.record;i.setActiveEditor(null);i.setActiveColumn(null);i.setActiveRecord(null);c.value=j;if(!i.validateEdit()){return}if(!g.isEqual(j,d)){g.set(b.dataIndex,j)}if(e.setCurrentPosition){e.setCurrentPosition(e.getCurrentPosition())}else{a.getView().focus()}i.fireEvent("edit",i,c);i.editing=false}},cancelEdit:function(){var c=this,b=c.getActiveEditor(),a=c.grid.getView().getEl(c.getActiveColumn());c.setActiveEditor(null);c.setActiveColumn(null);c.setActiveRecord(null);if(b){b.cancelEdit();a.focus();c.callParent(arguments);return}return true},startEditByPosition:function(a){a.column=this.view.getHeaderCt().getVisibleHeaderClosestToIndex(a.column).getIndex();return this.startEdit(a.row,a.column)}});Ext.define("Ext.grid.plugin.DivRenderer",{alias:"plugin.divrenderer",extend:Ext.AbstractPlugin,tableTpl:['<div id="{view.id}-table" class="'+Ext.baseCSSPrefix+"{view.id}-table "+Ext.baseCSSPrefix+'grid-table" style="{tableStyle}">',"{%","values.view.renderRows(values.rows, values.viewStartIndex, out);","%}","</div>",{priority:0}],rowTpl:["{%",'var dataRowCls = values.recordIndex === -1 ? "" : " '+Ext.baseCSSPrefix+'grid-data-row";',"%}",'<dl {[values.rowId ? ("id=\\"" + values.rowId + "\\"") : ""]} ','data-boundView="{view.id}" ','data-recordId="{record.internalId}" ','data-recordIndex="{recordIndex}" ','class="{[values.itemClasses.join(" ")]} {[values.rowClasses.join(" ")]}{[dataRowCls]}" ','style="position:relative" ',"{rowAttr:attributes}>",'<tpl for="columns">{%',"parent.view.renderCell(values, parent.record, parent.recordIndex, xindex - 1, out, parent)","%}","</tpl>","</dl>",{priority:0}],cellTpl:['<dt class="{tdCls}" {tdAttr} data-cellIndex="{cellIndex}">','<div {unselectableAttr} class="'+Ext.baseCSSPrefix+'grid-cell-inner"','style="text-align:{align};<tpl if="style">{style}</tpl>">{value}</div>',"</dt>",{priority:0}],selectors:{bodySelector:"div",nodeContainerSelector:"div",itemSelector:"dl."+Ext.baseCSSPrefix+"grid-row",dataRowSelector:"dl."+Ext.baseCSSPrefix+"grid-data-row",cellSelector:"dt."+Ext.baseCSSPrefix+"grid-cell",innerSelector:"div."+Ext.baseCSSPrefix+"grid-cell-inner",getNodeContainerSelector:function(){return this.getBodySelector()},getNodeContainer:function(){return this.el.getById(this.id+"-table",true)}},init:function(b){var a=b.getView();a.tableTpl=Ext.XTemplate.getTpl(this,"tableTpl");a.rowTpl=Ext.XTemplate.getTpl(this,"rowTpl");a.cellTpl=Ext.XTemplate.getTpl(this,"cellTpl");Ext.apply(a,this.selectors)}});Ext.define("Ext.grid.plugin.DragDrop",{extend:Ext.AbstractPlugin,alias:"plugin.gridviewdragdrop",dragText:"{0} selected row{1}",ddGroup:"GridDD",enableDrop:true,enableDrag:true,containerScroll:false,init:function(a){a.on("render",this.onViewRender,this,{single:true})},destroy:function(){Ext.destroy(this.dragZone,this.dropZone)},enable:function(){var a=this;if(a.dragZone){a.dragZone.unlock()}if(a.dropZone){a.dropZone.unlock()}a.callParent()},disable:function(){var a=this;if(a.dragZone){a.dragZone.lock()}if(a.dropZone){a.dropZone.lock()}a.callParent()},onViewRender:function(a){var b=this,c;if(b.enableDrag){if(b.containerScroll){c=a.getEl()}b.dragZone=new Ext.view.DragZone({view:a,ddGroup:b.dragGroup||b.ddGroup,dragText:b.dragText,containerScroll:b.containerScroll,scrollEl:c})}if(b.enableDrop){b.dropZone=new Ext.grid.ViewDropZone({view:a,ddGroup:b.dropGroup||b.ddGroup})}}});Ext.define("Ext.grid.plugin.RowEditing",{extend:Ext.grid.plugin.Editing,alias:"plugin.rowediting",lockableScope:"top",editStyle:"row",autoCancel:true,errorSummary:true,constructor:function(){var a=this;a.callParent(arguments);if(!a.clicksToMoveEditor){a.clicksToMoveEditor=a.clicksToEdit}a.autoCancel=!!a.autoCancel},destroy:function(){Ext.destroy(this.editor);this.callParent(arguments)},startEdit:function(a,e){var d=this,c=d.getEditor(),b;if(c.beforeEdit()!==false){b=d.callParent(arguments);if(b){d.context=b;if(d.lockingPartner){d.lockingPartner.cancelEdit()}c.startEdit(b.record,b.column,b);return true}}return false},cancelEdit:function(){var a=this;if(a.editing){a.getEditor().cancelEdit();a.callParent(arguments);return}return true},completeEdit:function(){var a=this;if(a.editing&&a.validateEdit()){a.editing=false;a.fireEvent("edit",a,a.context)}},validateEdit:function(){var k=this,h=k.editor,b=k.context,g=b.record,m={},d={},j=h.items.items,i,c=j.length,a,l;for(i=0;i<c;i++){l=j[i];a=l.name;m[a]=l.getValue();d[a]=g.get(a)}Ext.apply(b,{newValues:m,originalValues:d});return k.callParent(arguments)&&k.getEditor().completeEdit()},getEditor:function(){var a=this;if(!a.editor){a.editor=a.initEditor()}return a.editor},initEditor:function(){return new Ext.grid.RowEditor(this.initEditorConfig())},initEditorConfig:function(){var h=this,c=h.grid,i=h.view,d=c.headerCt,e=["saveBtnText","cancelBtnText","errorsText","dirtyText"],j,a=e.length,g={autoCancel:h.autoCancel,errorSummary:h.errorSummary,fields:d.getGridColumns(),hidden:true,view:i,editingPlugin:h},k;for(j=0;j<a;j++){k=e[j];if(Ext.isDefined(h[k])){g[k]=h[k]}}return g},initEditTriggers:function(){var b=this,a=b.view,c=b.clicksToMoveEditor===1?"click":"dblclick";b.callParent(arguments);if(b.clicksToMoveEditor!==b.clicksToEdit){b.mon(a,"cell"+c,b.moveEditorByClick,b)}a.on({render:function(){b.mon(b.grid.headerCt,{scope:b,columnresize:b.onColumnResize,columnhide:b.onColumnHide,columnshow:b.onColumnShow,columnmove:b.onColumnMove})},single:true})},startEditByClick:function(){var a=this;if(!a.editing||a.clicksToMoveEditor===a.clicksToEdit){a.callParent(arguments)}},moveEditorByClick:function(){var a=this;if(a.editing){a.superclass.onCellClick.apply(a,arguments)}},onColumnAdd:function(a,c){if(c.isHeader){var d=this,b;d.initFieldAccessors(c);b=d.editor;if(b&&b.onColumnAdd){b.onColumnAdd(c)}}},onColumnRemove:function(a,c){if(c.isHeader){var d=this,b=d.getEditor();if(b&&b.onColumnRemove){b.onColumnRemove(c)}d.removeFieldAccessors(c)}},onColumnResize:function(a,d,c){if(d.isHeader){var e=this,b=e.getEditor();if(b&&b.onColumnResize){b.onColumnResize(d,c)}}},onColumnHide:function(a,c){var d=this,b=d.getEditor();if(b&&b.onColumnHide){b.onColumnHide(c)}},onColumnShow:function(a,c){var d=this,b=d.getEditor();if(b&&b.onColumnShow){b.onColumnShow(c)}},onColumnMove:function(a,d,c,g){var e=this,b=e.getEditor();if(b&&b.onColumnMove){b.onColumnMove(d,c,g-(g>c?1:0))}},setColumnField:function(b,d){var c=this,a=c.getEditor();a.removeField(b);c.callParent(arguments);c.getEditor().setField(b)}});Ext.define("Ext.grid.plugin.RowExpander",{extend:Ext.AbstractPlugin,lockableScope:"normal",alias:"plugin.rowexpander",rowBodyTpl:null,expandOnEnter:true,expandOnDblClick:true,selectRowOnExpand:false,rowBodyTrSelector:".x-grid-rowbody-tr",rowBodyHiddenCls:"x-grid-row-body-hidden",rowCollapsedCls:"x-grid-row-collapsed",addCollapsedCls:{before:function(a,b){var c=this.rowExpander;if(!c.recordsExpanded[a.record.internalId]){a.itemClasses.push(c.rowCollapsedCls)}},priority:500},setCmp:function(b){var d=this,a,c;d.callParent(arguments);d.recordsExpanded={};d.rowBodyTpl=Ext.XTemplate.getTpl(d,"rowBodyTpl");a=this.rowBodyTpl;c=[{ftype:"rowbody",lockableScope:"normal",recordsExpanded:d.recordsExpanded,rowBodyHiddenCls:d.rowBodyHiddenCls,rowCollapsedCls:d.rowCollapsedCls,setupRowData:d.getRowBodyFeatureData,getRowBodyContents:function(e){return a.applyTemplate(e.getData())}},{ftype:"rowwrap",lockableScope:"normal"}];if(b.features){b.features=Ext.Array.push(c,b.features)}else{b.features=c}},init:function(b){var d=this,a=b,c;d.callParent(arguments);d.grid=b;d.view=b.getView();d.addExpander();d.bindView(d.view);d.view.addRowTpl(d.addCollapsedCls).rowExpander=d;if(b.ownerLockable){a=b.ownerLockable;a.syncRowHeight=false;c=a.lockedGrid.getView();d.bindView(c);c.addRowTpl(d.addCollapsedCls).rowExpander=d;a.mon(a,"columnschanged",d.refreshRowHeights,d);a.mon(a.store,"datachanged",d.refreshRowHeights,d)}a.on("beforereconfigure",d.beforeReconfigure,d)},beforeReconfigure:function(d,a,c,e,b){var g=this.getHeaderConfig();g.locked=true;c.unshift(g)},addExpander:function(){var b=this,a=b.grid,c=b.getHeaderConfig();if(a.ownerLockable){a=a.ownerLockable.lockedGrid;a.width+=c.width}a.headerCt.insert(0,c)},getRowBodyFeatureData:function(b,a,d){var c=this;c.self.prototype.setupRowData.apply(c,arguments);if(!c.grid.ownerLockable){d.rowBodyColspan=d.rowBodyColspan-1}d.rowBody=c.getRowBodyContents(b);d.rowBodyCls=c.recordsExpanded[b.internalId]?"":c.rowBodyHiddenCls},bindView:function(a){if(this.expandOnEnter){a.on("itemkeydown",this.onKeyDown,this)}if(this.expandOnDblClick){a.on("itemdblclick",this.onDblClick,this)}},onKeyDown:function(k,g,l,a,h){if(h.getKey()==h.ENTER){var b=k.store,c=k.getSelectionModel().getSelection(),j=c.length,d=0;for(;d<j;d++){a=b.indexOf(c[d]);this.toggleRow(a,c[d])}}},onDblClick:function(b,a,g,c,d){this.toggleRow(c,a)},toggleRow:function(b,e){var h=this,i=h.view,c=i.getNode(b),k=Ext.fly(c,"_rowExpander"),g=k.down(h.rowBodyTrSelector,true),d=k.hasCls(h.rowCollapsedCls),j=d?"removeCls":"addCls",a;Ext.suspendLayouts();k[j](h.rowCollapsedCls);Ext.fly(g)[j](h.rowBodyHiddenCls);h.recordsExpanded[e.internalId]=d;i.refreshSize();i.fireEvent(d?"expandbody":"collapsebody",k.dom,e,g);if(h.grid.ownerLockable){i=h.grid.ownerLockable.lockedGrid.view;a=k.getHeight();k=Ext.fly(i.getNode(b),"_rowExpander");k.setHeight(a);k[j](h.rowCollapsedCls);i.refreshSize()}Ext.resumeLayouts(true)},refreshRowHeights:function(){Ext.globalEvents.on({idle:this.doRefreshRowHeights,scope:this,single:true})},doRefreshRowHeights:function(){var h=this,j=h.recordsExpanded,i,e,k=h.grid.ownerLockable.lockedGrid.view,a=h.grid.ownerLockable.normalGrid.view,c,d,g,b;for(i in j){if(j.hasOwnProperty(i)){e=this.view.store.data.get(i);d=k.getNode(e,false);c=a.getNode(e,false);d.style.height=c.style.height="";g=d.offsetHeight;b=c.offsetHeight;if(b>g){d.style.height=b+"px"}else{if(g>b){c.style.height=g+"px"}}}}},getHeaderConfig:function(){var a=this;return{width:24,lockable:false,sortable:false,resizable:false,draggable:false,hideable:false,menuDisabled:true,tdCls:Ext.baseCSSPrefix+"grid-cell-special",renderer:function(c,b){if(!a.grid.ownerLockable){b.tdAttr+=' rowspan="2"'}return'<div class="'+Ext.baseCSSPrefix+'grid-row-expander">&#160;</div>'},processEvent:function(h,d,b,j,g,i,c){if(h=="mousedown"&&i.getTarget(".x-grid-row-expander")){a.toggleRow(j,c);return a.selectRowOnExpand}}}}});Ext.define("Ext.grid.property.Grid",{extend:Ext.grid.Panel,alias:"widget.propertygrid",alternateClassName:"Ext.grid.PropertyGrid",valueField:"value",nameField:"name",inferTypes:true,enableColumnMove:false,columnLines:true,stripeRows:false,trackMouseOver:false,clicksToEdit:1,enableHdMenu:false,gridCls:Ext.baseCSSPrefix+"property-grid",initComponent:function(){var a=this;a.source=a.source||{};a.addCls(a.gridCls);a.plugins=a.plugins||[];a.plugins.push(new Ext.grid.plugin.CellEditing({clicksToEdit:a.clicksToEdit,startEdit:function(b,c){return this.self.prototype.startEdit.call(this,b,a.headerCt.child("#"+a.valueField))}}));a.selModel={selType:"cellmodel",onCellSelect:function(b){if(b.column!=1){b.column=1}return this.self.prototype.onCellSelect.call(this,b)}};a.sourceConfig=Ext.apply({},a.sourceConfig);if(!a.store){a.propStore=a.store=new Ext.grid.property.Store(a,a.source)}a.configure(a.sourceConfig);if(a.sortableColumns){a.store.sort("name","ASC")}a.columns=new Ext.grid.property.HeaderContainer(a,a.store);a.addEvents("beforepropertychange","propertychange");a.callParent();a.getView().walkCells=this.walkCells;a.editors={date:new Ext.grid.CellEditor({field:new Ext.form.field.Date({selectOnFocus:true})}),string:new Ext.grid.CellEditor({field:new Ext.form.field.Text({selectOnFocus:true})}),number:new Ext.grid.CellEditor({field:new Ext.form.field.Number({selectOnFocus:true})}),"boolean":new Ext.grid.CellEditor({field:new Ext.form.field.ComboBox({editable:false,store:[[true,a.headerCt.trueText],[false,a.headerCt.falseText]]})})};a.store.on("update",a.onUpdate,a)},configure:function(b){var h=this,k=h.store,d=0,e=h.store.getCount(),l=h.nameField,m=h.valueField,a,j,c,g;h.configureLegacy(b);if(h.inferTypes){for(;d<e;++d){c=k.getAt(d);a=c.get(l);if(!h.getConfig(a,"type")){j=c.get(m);if(Ext.isDate(j)){g="date"}else{if(Ext.isNumber(j)){g="number"}else{if(Ext.isBoolean(j)){g="boolean"}else{g="string"}}}h.setConfig(a,"type",g)}}}},getConfig:function(e,d,a){var c=this.sourceConfig[e],b;if(c){b=c[d]}return b||a},setConfig:function(e,b,c){var a=this.sourceConfig,d=a[e];if(!d){d=a[e]={__copied:true}}else{if(!d.__copied){d=Ext.apply({__copied:true},d);a[e]=d}}d[b]=c;return c},configureLegacy:function(a){var c=this,e,b,d;c.copyLegacyObject(a,c.customRenderers,"renderer");c.copyLegacyObject(a,c.customEditors,"editor");c.copyLegacyObject(a,c.propertyNames,"displayName")},copyLegacyObject:function(a,e,c){var b,d;for(b in e){if(e.hasOwnProperty(b)){if(!a[b]){a[b]={}}a[b][c]=e[b]}}},onUpdate:function(d,a,c){var g=this,b,e;if(g.rendered&&c==Ext.data.Model.EDIT){b=a.get(g.valueField);e=a.modified.value;if(g.fireEvent("beforepropertychange",g.source,a.getId(),b,e)!==false){if(g.source){g.source[a.getId()]=b}a.commit();g.fireEvent("propertychange",g.source,a.getId(),b,e)}else{a.reject()}}},walkCells:function(h,g,d,c,a,b){if(g=="left"){g="up"}else{if(g=="right"){g="down"}}h=Ext.view.Table.prototype.walkCells.call(this,h,g,d,c,a,b);if(h&&!h.column){h.column=1}return h},getCellEditor:function(a,d){var g=this,h=a.get(g.nameField),i=a.get(g.valueField),c=g.getConfig(h,"editor"),b=g.getConfig(h,"type"),e=g.editors;if(c){if(!(c instanceof Ext.grid.CellEditor)){if(!(c instanceof Ext.form.field.Base)){c=Ext.ComponentManager.create(c,"textfield")}c=g.setConfig(h,"editor",new Ext.grid.CellEditor({field:c}))}}else{if(b){switch(b){case"date":c=e.date;break;case"number":c=e.number;break;case"boolean":c=g.editors["boolean"];break;default:c=e.string}}else{if(Ext.isDate(i)){c=e.date}else{if(Ext.isNumber(i)){c=e.number}else{if(Ext.isBoolean(i)){c=e["boolean"]}else{c=e.string}}}}}c.editorId=h;return c},beforeDestroy:function(){var a=this;a.callParent();a.destroyEditors(a.editors);a.destroyEditors(a.customEditors);delete a.source},destroyEditors:function(b){for(var a in b){if(b.hasOwnProperty(a)){Ext.destroy(b[a])}}},setSource:function(b,c){var a=this;a.source=b;if(c!==undefined){a.sourceConfig=Ext.apply({},c);a.configure(a.sourceConfig)}a.propStore.setSource(b)},getSource:function(){return this.propStore.getSource()},setProperty:function(c,b,a){this.propStore.setValue(c,b,a)},removeProperty:function(a){this.propStore.remove(a)}});Ext.define("Ext.grid.property.HeaderContainer",{extend:Ext.grid.header.Container,alternateClassName:"Ext.grid.PropertyColumnModel",nameWidth:115,nameText:"Name",valueText:"Value",dateFormat:"m/j/Y",trueText:"true",falseText:"false",nameColumnCls:Ext.baseCSSPrefix+"grid-property-name",constructor:function(b,a){var c=this;c.grid=b;c.store=a;c.callParent([{enableColumnResize:Ext.isDefined(b.enableColumnResize)?b.enableColumnResize:c.enableColumnResize,enableColumnMove:Ext.isDefined(b.enableColumnMove)?b.enableColumnMove:c.enableColumnMove,items:[{header:c.nameText,width:b.nameColumnWidth||c.nameWidth,sortable:b.sortableColumns,dataIndex:b.nameField,renderer:Ext.Function.bind(c.renderProp,c),itemId:b.nameField,menuDisabled:true,tdCls:c.nameColumnCls},{header:c.valueText,renderer:Ext.Function.bind(c.renderCell,c),getEditor:Ext.Function.bind(c.getCellEditor,c),sortable:b.sortableColumns,flex:1,fixed:true,dataIndex:b.valueField,itemId:b.valueField,menuDisabled:true}]}])},getCellEditor:function(a){return this.grid.getCellEditor(a,this)},renderProp:function(a){return this.getPropertyName(a)},renderCell:function(h,e,g){var c=this,b=c.grid,d=b.getConfig(g.get(b.nameField),"renderer"),a=h;if(d){return d.apply(c,arguments)}if(Ext.isDate(h)){a=c.renderDate(h)}else{if(Ext.isBoolean(h)){a=c.renderBool(h)}}return Ext.util.Format.htmlEncode(a)},renderDate:Ext.util.Format.date,renderBool:function(a){return this[a?"trueText":"falseText"]},getPropertyName:function(a){return this.grid.getConfig(a,"displayName",a)}});Ext.define("Ext.grid.property.Property",{extend:Ext.data.Model,alternateClassName:"Ext.PropGridProperty",fields:[{name:"name",type:"string"},{name:"value"}],idProperty:"name"});Ext.define("Ext.grid.property.Store",{extend:Ext.data.Store,alternateClassName:"Ext.grid.PropertyStore",sortOnLoad:false,constructor:function(a,c){var b=this;b.grid=a;b.source=c;b.callParent([{data:c,model:Ext.grid.property.Property,proxy:b.getProxy()}])},getProxy:function(){if(!this.proxy){Ext.grid.property.Store.prototype.proxy=new Ext.data.proxy.Memory({model:Ext.grid.property.Property,reader:this.getReader()})}return this.proxy},getReader:function(){if(!this.reader){Ext.grid.property.Store.prototype.reader=new Ext.data.reader.Reader({model:Ext.grid.property.Property,buildExtractors:Ext.emptyFn,read:function(a){return this.readRecords(a)},readRecords:function(b){var d,c,a={records:[],success:true};for(c in b){if(b.hasOwnProperty(c)){d=b[c];if(this.isEditableValue(d)){a.records.push(new Ext.grid.property.Property({name:c,value:d},c))}}}a.total=a.count=a.records.length;return new Ext.data.ResultSet(a)},isEditableValue:function(a){return Ext.isPrimitive(a)||Ext.isDate(a)||a===null}})}return this.reader},setSource:function(a){var b=this;b.source=a;b.suspendEvents();b.removeAll();b.proxy.data=a;b.load();b.resumeEvents();b.fireEvent("datachanged",b);b.fireEvent("refresh",b)},getProperty:function(a){return Ext.isNumber(a)?this.getAt(a):this.getById(a)},setValue:function(e,c,a){var b=this,d=b.getRec(e);if(d){d.set("value",c);b.source[e]=c}else{if(a){b.source[e]=c;d=new Ext.grid.property.Property({name:e,value:c},e);b.add(d)}}},remove:function(b){var a=this.getRec(b);if(a){this.callParent([a]);delete this.source[b]}},getRec:function(a){return this.getById(a)},getSource:function(){return this.source}});Ext.define("Ext.layout.ClassList",(function(){var b=Ext.String.splitWords,a=Ext.Array.toMap;return{dirty:false,constructor:function(c){this.owner=c;this.map=a(this.classes=b(c.el.className))},add:function(c){var d=this;if(!d.map[c]){d.map[c]=true;d.classes.push(c);if(!d.dirty){d.dirty=true;d.owner.markDirty()}}},addMany:function(c){Ext.each(b(c),this.add,this)},contains:function(c){return this.map[c]},flush:function(){this.owner.el.className=this.classes.join(" ");this.dirty=false},remove:function(c){var d=this;if(d.map[c]){delete d.map[c];d.classes=Ext.Array.filter(d.classes,function(e){return e!=c});if(!d.dirty){d.dirty=true;d.owner.markDirty()}}},removeMany:function(d){var e=this,c=a(b(d));e.classes=Ext.Array.filter(e.classes,function(g){if(!c[g]){return true}delete e.map[g];if(!e.dirty){e.dirty=true;e.owner.markDirty()}return false})}}}()));Ext.define("Ext.util.Queue",{constructor:function(){this.clear()},add:function(c){var b=this,a=b.getKey(c);if(!b.map[a]){++b.length;b.items.push(c);b.map[a]=c}return c},clear:function(){var b=this,a=b.items;b.items=[];b.map={};b.length=0;return a},contains:function(b){var a=this.getKey(b);return this.map.hasOwnProperty(a)},getCount:function(){return this.length},getKey:function(a){return a.id},remove:function(e){var d=this,c=d.getKey(e),a=d.items,b;if(d.map[c]){b=Ext.Array.indexOf(a,e);Ext.Array.erase(a,b,1);delete d.map[c];--d.length}return e}});Ext.define("Ext.layout.ContextItem",{heightModel:null,widthModel:null,sizeModel:null,optOut:false,ownerSizePolicy:null,boxChildren:null,boxParent:null,isBorderBoxValue:null,children:[],dirty:null,dirtyCount:0,hasRawContent:true,isContextItem:true,isTopLevel:false,consumersContentHeight:0,consumersContentWidth:0,consumersContainerHeight:0,consumersContainerWidth:0,consumersHeight:0,consumersWidth:0,ownerCtContext:null,remainingChildDimensions:0,props:null,state:null,wrapsComponent:false,constructor:function(r){var s=this,p=Ext.layout.SizeModel.sizeModels,k=p.configured,j=p.shrinkWrap,b,q,n,m,g,d,t,e,o,l,c,i,h,a;Ext.apply(s,r);b=s.el;s.id=b.id;s.flushedProps={};s.props=g={};s.styles={};t=s.target;if(!t.isComponent){q=b.lastBox}else{s.wrapsComponent=true;s.framing=t.frameSize||null;s.isComponentChild=t.ownerLayout&&t.ownerLayout.isComponentLayout;q=t.lastBox;n=t.ownerCt;if(n&&(m=s.context.items[n.el.id])){s.ownerCtContext=m}s.sizeModel=d=t.getSizeModel(m&&m.widthModel.pairsByHeightOrdinal[m.heightModel.ordinal]);s.widthModel=i=d.width;s.heightModel=h=d.height;if(q&&q.invalid===false){l=(t.width===(e=q.width));c=(t.height===(o=q.height));if(i===j&&h===j){a=true}else{if(i===k&&l){a=h===j||(h===k&&c)}}if(a){s.optOut=true;g.width=e;g.height=o}}}s.lastBox=q},init:function(j,c){var s=this,a=s.props,d=s.dirty,l=s.ownerCtContext,p=s.target.ownerLayout,h=!s.state,t=j||h,e,o,m,q,b,u,v=s.heightModel,g=s.widthModel,k,r;s.dirty=s.invalid=false;s.props={};s.remainingChildDimensions=0;if(s.boxChildren){s.boxChildren.length=0}if(!h){s.clearAllBlocks("blocks");s.clearAllBlocks("domBlocks")}if(!s.wrapsComponent){return t}u=s.target;s.state={};if(h){if(u.beforeLayout&&u.beforeLayout!==Ext.emptyFn){u.beforeLayout()}if(!l&&(q=u.ownerCt)){l=s.context.items[q.el.id]}if(l){s.ownerCtContext=l;s.isBoxParent=u.ownerLayout.isItemBoxParent(s)}else{s.isTopLevel=true}s.frameBodyContext=s.getEl("frameBody")}else{l=s.ownerCtContext;s.isTopLevel=!l;e=s.children;for(o=0,m=e.length;o<m;++o){e[o].init(true)}}s.hasRawContent=!(u.isContainer&&u.items.items.length>0);if(j){s.widthModel=s.heightModel=null;b=u.getSizeModel(l&&l.widthModel.pairsByHeightOrdinal[l.heightModel.ordinal]);if(h){s.sizeModel=b}s.widthModel=b.width;s.heightModel=b.height;if(l&&!s.isComponentChild){l.remainingChildDimensions+=2}}else{if(a){s.recoverProp("x",a,d);s.recoverProp("y",a,d);if(s.widthModel.calculated){s.recoverProp("width",a,d)}if(s.heightModel.calculated){s.recoverProp("height",a,d)}if(l&&!s.isComponentChild){l.remainingChildDimensions+=("width" in a)+("height" in a)}}}if(a&&p&&p.manageMargins){s.recoverProp("margin-top",a,d);s.recoverProp("margin-right",a,d);s.recoverProp("margin-bottom",a,d);s.recoverProp("margin-left",a,d)}if(c){k=c.heightModel;r=c.widthModel;if(r&&k&&g&&v){if(g.shrinkWrap&&v.shrinkWrap){if(r.constrainedMax&&k.constrainedMin){k=null}}}if(r){s.widthModel=r}if(k){s.heightModel=k}if(c.state){Ext.apply(s.state,c.state)}}return t},initContinue:function(e){var g=this,d=g.ownerCtContext,a=g.target,c=g.widthModel,h=a.getHierarchyState(),b;if(c.fixed){h.inShrinkWrapTable=false}else{delete h.inShrinkWrapTable}if(e){if(d&&c.shrinkWrap){b=d.isBoxParent?d:d.boxParent;if(b){b.addBoxChild(g)}}else{if(c.natural){g.boxParent=d}}}return e},initDone:function(d){var b=this,a=b.props,c=b.state;if(b.remainingChildDimensions===0){a.containerChildrenSizeDone=true}if(d){a.containerLayoutDone=true}if(b.boxChildren&&b.boxChildren.length&&b.widthModel.shrinkWrap){b.el.setWidth(10000);c.blocks=(c.blocks||0)+1}},initAnimation:function(){var b=this,c=b.target,a=b.ownerCtContext;if(a&&a.isTopLevel){b.animatePolicy=c.ownerLayout.getAnimatePolicy(b)}else{if(!a&&c.isCollapsingOrExpanding&&c.animCollapse){b.animatePolicy=c.componentLayout.getAnimatePolicy(b)}}if(b.animatePolicy){b.context.queueAnimation(b)}},addCls:function(a){this.getClassList().addMany(a)},removeCls:function(a){this.getClassList().removeMany(a)},addBlock:function(b,d,e){var c=this,g=c[b]||(c[b]={}),a=g[e]||(g[e]={});if(!a[d.id]){a[d.id]=d;++d.blockCount;++c.context.blockCount}},addBoxChild:function(d){var c=this,b,a=d.widthModel;d.boxParent=this;d.measuresBox=a.shrinkWrap?d.hasRawContent:a.natural;if(d.measuresBox){b=c.boxChildren;if(b){b.push(d)}else{c.boxChildren=[d]}}},addPositionStyles:function(d,b){var a=b.x,e=b.y,c=0;if(a!==undefined){d.left=a+"px";++c}if(e!==undefined){d.top=e+"px";++c}return c},addTrigger:function(g,h){var e=this,a=h?"domTriggers":"triggers",i=e[a]||(e[a]={}),b=e.context,d=b.currentLayout,c=i[g]||(i[g]={});if(!c[d.id]){c[d.id]=d;++d.triggerCount;c=b.triggers[h?"dom":"data"];(c[d.id]||(c[d.id]=[])).push({item:this,prop:g});if(e.props[g]!==undefined){if(!h||!(e.dirty&&(g in e.dirty))){++d.firedTriggers}}}},boxChildMeasured:function(){var b=this,c=b.state,a=(c.boxesMeasured=(c.boxesMeasured||0)+1);if(a==b.boxChildren.length){c.clearBoxWidth=1;++b.context.progressCount;b.markDirty()}},borderNames:["border-top-width","border-right-width","border-bottom-width","border-left-width"],marginNames:["margin-top","margin-right","margin-bottom","margin-left"],paddingNames:["padding-top","padding-right","padding-bottom","padding-left"],trblNames:["top","right","bottom","left"],cacheMissHandlers:{borderInfo:function(a){var b=a.getStyles(a.borderNames,a.trblNames);b.width=b.left+b.right;b.height=b.top+b.bottom;return b},marginInfo:function(a){var b=a.getStyles(a.marginNames,a.trblNames);b.width=b.left+b.right;b.height=b.top+b.bottom;return b},paddingInfo:function(b){var a=b.frameBodyContext||b,c=a.getStyles(b.paddingNames,b.trblNames);c.width=c.left+c.right;c.height=c.top+c.bottom;return c}},checkCache:function(a){return this.cacheMissHandlers[a](this)},clearAllBlocks:function(a){var c=this[a],b;if(c){for(b in c){this.clearBlocks(a,b)}}},clearBlocks:function(c,g){var h=this[c],b=h&&h[g],d,e,a;if(b){delete h[g];d=this.context;for(a in b){e=b[a];--d.blockCount;if(!--e.blockCount&&!e.pending&&!e.done){d.queueLayout(e)}}}},block:function(a,b){this.addBlock("blocks",a,b)},domBlock:function(a,b){this.addBlock("domBlocks",a,b)},fireTriggers:function(b,g){var h=this[b],d=h&&h[g],c=this.context,e,a;if(d){for(a in d){e=d[a];++e.firedTriggers;if(!e.done&&!e.blockCount&&!e.pending){c.queueLayout(e)}}}},flush:function(){var b=this,a=b.dirty,c=b.state,d=b.el;b.dirtyCount=0;if(b.classList&&b.classList.dirty){b.classList.flush()}if("attributes" in b){d.set(b.attributes);delete b.attributes}if("innerHTML" in b){d.innerHTML=b.innerHTML;delete b.innerHTML}if(c&&c.clearBoxWidth){c.clearBoxWidth=0;b.el.setStyle("width",null);if(!--c.blocks){b.context.queueItemLayouts(b)}}if(a){delete b.dirty;b.writeProps(a,true)}},flushAnimations:function(){var o=this,c=o.previousSize,l,n,e,h,g,d,i,m,k,a,b;if(c){l=o.target;n=l.layout&&l.layout.animate;if(n){e=Ext.isNumber(n)?n:n.duration}h=Ext.Object.getKeys(o.animatePolicy);g=Ext.apply({},{from:{},to:{},duration:e||Ext.fx.Anim.prototype.duration},n);for(d=0,i=0,m=h.length;i<m;i++){k=h[i];a=c[k];b=o.peek(k);if(a!=b){k=o.translateProps[k]||k;g.from[k]=a;g.to[k]=b;++d}}if(d){if(o.isCollapsingOrExpanding===1){l.componentLayout.undoLayout(o)}else{o.writeProps(g.from)}o.el.animate(g);Ext.fx.Manager.getFxQueue(o.el.id)[0].on({afteranimate:function(){if(o.isCollapsingOrExpanding===1){l.componentLayout.redoLayout(o);l.afterCollapse(true)}else{if(o.isCollapsingOrExpanding===2){l.afterExpand(true)}}}})}}},getBorderInfo:function(){var a=this,b=a.borderInfo;if(!b){a.borderInfo=b=a.checkCache("borderInfo")}return b},getClassList:function(){return this.classList||(this.classList=new Ext.layout.ClassList(this))},getEl:function(c,a){var e=this,g,d,b;if(c){if(c.dom){d=c}else{g=e.target;if(a){g=a}d=g[c];if(typeof d=="function"){d=d.call(g);if(d===e.el){return this}}}if(d){b=e.context.getEl(e,d)}}return b||null},getFrameInfo:function(){var c=this,d=c.frameInfo,b,a;if(!d){b=c.framing;a=c.getBorderInfo();c.frameInfo=d=b?{top:b.top+a.top,right:b.right+a.right,bottom:b.bottom+a.bottom,left:b.left+a.left,width:b.width+a.width,height:b.height+a.height}:a}return d},getMarginInfo:function(){var d=this,h=d.marginInfo,b,a,g,e,c;if(!h){if(!d.wrapsComponent){h=d.checkCache("marginInfo")}else{b=d.target;e=b.ownerLayout;c=e?e.id:null;a=e&&e.manageMargins;h=b.margin$;if(h&&h.ownerId!==c){h=null}if(!h){h=d.parseMargins(b,b.margin)||d.checkCache("marginInfo");if(a){g=d.parseMargins(b,b.margins,e.defaultMargins);if(g){h={top:h.top+g.top,right:h.right+g.right,bottom:h.bottom+g.bottom,left:h.left+g.left}}d.setProp("margin-top",0);d.setProp("margin-right",0);d.setProp("margin-bottom",0);d.setProp("margin-left",0)}h.ownerId=c;b.margin$=h}h.width=h.left+h.right;h.height=h.top+h.bottom}d.marginInfo=h}return h},clearMarginCache:function(){delete this.marginInfo;delete this.target.margin$},getPaddingInfo:function(){var a=this,b=a.paddingInfo;if(!b){a.paddingInfo=b=a.checkCache("paddingInfo")}return b},getProp:function(c){var b=this,a=b.props[c];b.addTrigger(c);return a},getDomProp:function(c){var b=this,a=(b.dirty&&(c in b.dirty))?undefined:b.props[c];b.addTrigger(c,true);return a},getStyle:function(a){var c=this,b=c.styles,e,d;if(a in b){d=b[a]}else{e=c.styleInfo[a];d=c.el.getStyle(a);if(e&&e.parseInt){d=parseInt(d,10)||0}b[a]=d}return d},getStyles:function(p,b){var m=this,e=m.styles,q={},g=0,d=p.length,k,j,l,a,c,h,r,o;b=b||p;for(k=0;k<d;++k){a=p[k];if(a in e){q[b[k]]=e[a];++g;if(k&&g==1){j=p.slice(0,k);l=b.slice(0,k)}}else{if(g){(j||(j=[])).push(a);(l||(l=[])).push(b[k])}}}if(g<d){j=j||p;l=l||b;h=m.styleInfo;r=m.el.getStyle(j);for(k=j.length;k--;){a=j[k];c=h[a];o=r[a];if(c&&c.parseInt){o=parseInt(o,10)||0}q[l[k]]=o;e[a]=o}}return q},hasProp:function(b){var a=this.getProp(b);return typeof a!="undefined"},hasDomProp:function(b){var a=this.getDomProp(b);return typeof a!="undefined"},invalidate:function(a){this.context.queueInvalidate(this,a)},markDirty:function(){if(++this.dirtyCount==1){this.context.queueFlush(this)}},onBoxMeasured:function(){var a=this.boxParent,b=this.state;if(a&&a.widthModel.shrinkWrap&&!b.boxMeasured&&this.measuresBox){b.boxMeasured=1;a.boxChildMeasured()}},parseMargins:function(a,e,d){if(e===true){e=5}var c=typeof e,b;if(c=="string"||c=="number"){b=a.parseBox(e)}else{if(e||d){b={top:0,right:0,bottom:0,left:0};if(d){Ext.apply(b,this.parseMargins(a,d))}if(e){e=Ext.apply(b,a.parseBox(e))}}}return b},peek:function(a){return this.props[a]},recoverProp:function(g,b,a){var e=this,d=e.props,c;if(g in b){d[g]=b[g];if(a&&g in a){c=e.dirty||(e.dirty={});c[g]=a[g]}}},redo:function(b){var e=this,c,a,d;e.revertProps(e.props);if(b&&e.wrapsComponent){if(e.childItems){for(d=0,c=e.childItems,a=c.length;d<a;d++){c[d].redo(b)}}for(d=0,c=e.children,a=c.length;d<a;d++){c[d].redo()}}},removeEl:function(b,a){var d=this,e,c;if(b){if(b.dom){c=b}else{e=d.target;if(a){e=a}c=e[b];if(typeof c=="function"){c=c.call(e);if(c===d.el){return this}}}if(c){d.context.removeEl(d,c)}}},revertProps:function(d){var a,b=this.flushedProps,c={};for(a in d){if(b.hasOwnProperty(a)){c[a]=d[a]}}this.writeProps(c)},setAttribute:function(a,c){var b=this;if(!b.attributes){b.attributes={}}b.attributes[a]=c;b.markDirty()},setBox:function(b){var a=this;if("left" in b){a.setProp("x",b.left)}if("top" in b){a.setProp("y",b.top)}a.setSize(b.width,b.height)},setContentHeight:function(a,b){if(!b&&this.hasRawContent){return 1}return this.setProp("contentHeight",a)},setContentWidth:function(b,a){if(!a&&this.hasRawContent){return 1}return this.setProp("contentWidth",b)},setContentSize:function(c,a,b){return this.setContentWidth(c,b)+this.setContentHeight(a,b)==2},setProp:function(d,c,a){var b=this,h=typeof c,g,e;if(h=="undefined"||(h==="number"&&isNaN(c))){return 0}if(b.props[d]===c){return 1}b.props[d]=c;++b.context.progressCount;if(a===false){b.fireTriggers("domTriggers",d);b.clearBlocks("domBlocks",d)}else{e=b.styleInfo[d];if(e){if(!b.dirty){b.dirty={}}if(d=="width"||d=="height"){g=b.isBorderBoxValue;if(g===null){b.isBorderBoxValue=g=!!b.el.isBorderBox()}if(!g){b.borderInfo||b.getBorderInfo();b.paddingInfo||b.getPaddingInfo()}}b.dirty[d]=c;b.markDirty()}}b.fireTriggers("triggers",d);b.clearBlocks("blocks",d);return 1},setHeight:function(k,a){var g=this,d=g.target,c=g.ownerCtContext,h,e,b,j,i;if(k<0){k=0}if(!g.wrapsComponent){if(!g.setProp("height",k,a)){return NaN}}else{b=g.collapsedVert?0:(d.minHeight||0);k=Ext.Number.constrain(k,b,d.maxHeight);j=g.props.height;if(!g.setProp("height",k,a)){return NaN}if(c&&!g.isComponentChild&&isNaN(j)){i=--c.remainingChildDimensions;if(!i){c.setProp("containerChildrenSizeDone",true)}}h=g.frameBodyContext;if(h){e=g.getFrameInfo();h.setHeight(k-e.height,a)}}return k},setWidth:function(b,a){var i=this,g=i.target,e=i.ownerCtContext,j,h,d,c,k;if(b<0){b=0}if(!i.wrapsComponent){if(!i.setProp("width",b,a)){return NaN}}else{d=i.collapsedHorz?0:(g.minWidth||0);b=Ext.Number.constrain(b,d,g.maxWidth);c=i.props.width;if(!i.setProp("width",b,a)){return NaN}if(e&&!i.isComponentChild&&isNaN(c)){k=--e.remainingChildDimensions;if(!k){e.setProp("containerChildrenSizeDone",true)}}j=i.frameBodyContext;if(j){h=i.getFrameInfo();j.setWidth(b-h.width,a)}}return b},setSize:function(c,a,b){this.setWidth(c,b);this.setHeight(a,b)},translateProps:{x:"left",y:"top"},undo:function(b){var e=this,c,a,d;e.revertProps(e.lastBox);if(b&&e.wrapsComponent){if(e.childItems){for(d=0,c=e.childItems,a=c.length;d<a;d++){c[d].undo(b)}}for(d=0,c=e.children,a=c.length;d<a;d++){c[d].undo()}}},unsetProp:function(b){var a=this.dirty;delete this.props[b];if(a){delete a[b]}},writeProps:function(e,d){if(!(e&&typeof e=="object")){return}var w=this,c=w.el,i={},h=0,b=w.styleInfo,v,j,n,p=e.width,l=e.height,u=w.isBorderBoxValue,x=w.target,r=Math.max,t=0,k=0,g,a,o,q,s,m;if("displayed" in e){c.setDisplayed(e.displayed)}for(j in e){if(d){w.fireTriggers("domTriggers",j);w.clearBlocks("domBlocks",j);w.flushedProps[j]=1}v=b[j];if(v&&v.dom){if(v.suffix&&(n=parseInt(e[j],10))){i[j]=n+v.suffix}else{i[j]=e[j]}++h}}if("x" in e||"y" in e){if(x.isComponent){x.setPosition(e.x,e.y)}else{h+=w.addPositionStyles(i,e)}}if(!u&&(p>0||l>0)){if(!w.frameBodyContext){t=w.paddingInfo.width;k=w.paddingInfo.height}if(p){p=r(parseInt(p,10)-(w.borderInfo.width+t),0);i.width=p+"px";++h}if(l){l=r(parseInt(l,10)-(w.borderInfo.height+k),0);i.height=l+"px";++h}}if(w.wrapsComponent&&Ext.isIE9&&Ext.isStrict){if((g=p!==undefined&&w.hasOverflowY)||(a=l!==undefined&&w.hasOverflowX)){o=w.isAbsolute;if(o===undefined){o=false;m=w.target.getTargetEl();s=m.getStyle("position");if(s=="absolute"){s=m.getStyle("box-sizing");o=(s=="border-box")}w.isAbsolute=o}if(o){q=Ext.getScrollbarSize();if(g){p=parseInt(p,10)+q.width;i.width=p+"px";++h}if(a){l=parseInt(l,10)+q.height;i.height=l+"px";++h}}}}if(h){c.setStyle(i)}}},function(){var c={dom:true,parseInt:true,suffix:"px"},b={dom:true},a={dom:false};this.prototype.styleInfo={containerChildrenSizeDone:a,containerLayoutDone:a,displayed:a,done:a,x:a,y:a,columnWidthsDone:a,left:c,top:c,right:c,bottom:c,width:c,height:c,"border-top-width":c,"border-right-width":c,"border-bottom-width":c,"border-left-width":c,"margin-top":c,"margin-right":c,"margin-bottom":c,"margin-left":c,"padding-top":c,"padding-right":c,"padding-bottom":c,"padding-left":c,"line-height":b,display:b}});Ext.define("Ext.layout.Context",{remainingLayouts:0,state:0,constructor:function(a){var b=this;Ext.apply(b,a);b.items={};b.layouts={};b.blockCount=0;b.cycleCount=0;b.flushCount=0;b.calcCount=0;b.animateQueue=b.newQueue();b.completionQueue=b.newQueue();b.finalizeQueue=b.newQueue();b.finishQueue=b.newQueue();b.flushQueue=b.newQueue();b.invalidateData={};b.layoutQueue=b.newQueue();b.invalidQueue=[];b.triggers={data:{},dom:{}}},callLayout:function(b,a){this.currentLayout=b;b[a](this.getCmp(b.owner))},cancelComponent:function(j,a,m){var p=this,h=j,l=!j.isComponent,b=l?h.length:1,d,c,o,n,g,s,q,r,t,e;for(d=0;d<b;++d){if(l){j=h[d]}if(m&&j.ownerCt){e=this.items[j.ownerCt.el.id];if(e){Ext.Array.remove(e.childItems,p.getCmp(j))}}if(!a){q=p.invalidQueue;o=q.length;if(o){p.invalidQueue=s=[];for(c=0;c<o;++c){r=q[c];t=r.item.target;if(t!=j&&!t.isDescendant(j)){s.push(r)}}}}g=j.componentLayout;p.cancelLayout(g);if(g.getLayoutItems){n=g.getLayoutItems();if(n.length){p.cancelComponent(n,true)}}if(j.isContainer&&!j.collapsed){g=j.layout;p.cancelLayout(g);n=g.getVisibleItems();if(n.length){p.cancelComponent(n,true)}}}},cancelLayout:function(b){var a=this;a.completionQueue.remove(b);a.finalizeQueue.remove(b);a.finishQueue.remove(b);a.layoutQueue.remove(b);if(b.running){a.layoutDone(b)}b.ownerContext=null},clearTriggers:function(g,h){var a=g.id,e=this.triggers[h?"dom":"data"],j=e&&e[a],b=(j&&j.length)||0,e,d,k,c;for(d=0;d<b;++d){c=j[d];k=c.item;e=h?k.domTriggers:k.triggers;delete e[c.prop][a]}},flush:function(){var d=this,a=d.flushQueue.clear(),c=a.length,b;if(c){++d.flushCount;for(b=0;b<c;++b){a[b].flush()}}},flushAnimations:function(){var d=this,b=d.animateQueue.clear(),a=b.length,c;if(a){for(c=0;c<a;c++){if(b[c].target.animate!==false){b[c].flushAnimations()}}Ext.fx.Manager.runner()}},flushInvalidates:function(){var h=this,a=h.invalidQueue,g=a&&a.length,b,e,d,c;h.invalidQueue=[];if(g){e=[];for(c=0;c<g;++c){b=(d=a[c]).item.target;if(!b.container.isDetachedBody){e.push(b);if(d.options){h.invalidateData[b.id]=d.options}}}h.invalidate(e,null)}},flushLayouts:function(h,a,c){var g=this,j=c?g[h].items:g[h].clear(),e=j.length,b,d;if(e){for(b=0;b<e;++b){d=j[b];if(!d.running){g.callLayout(d,a)}}g.currentLayout=null}},getCmp:function(a){return this.getItem(a,a.el)},getEl:function(b,a){var c=this.getItem(a,a);if(!c.parent){c.parent=b;if(b.children.length){b.children.push(c)}else{b.children=[c]}}return c},getItem:function(d,b){var e=b.id,a=this.items,c=a[e]||(a[e]=new Ext.layout.ContextItem({context:this,target:d,el:b}));return c},handleFailure:function(){var c=this.layouts,b,a;Ext.failedLayouts=(Ext.failedLayouts||0)+1;for(a in c){b=c[a];if(c.hasOwnProperty(a)){b.running=false;b.ownerContext=null}}},invalidate:function(k,n){var p=this,m=!k.isComponent,c,a,g,l,q,o,b,h,j,e,d;for(g=0,b=m?k.length:1;g<b;++g){l=m?k[g]:k;if(l.rendered&&!l.hidden){q=p.getCmp(l);h=l.componentLayout;a=!h.ownerContext;j=(l.isContainer&&!l.collapsed)?l.layout:null;e=p.invalidateData[q.id];delete p.invalidateData[q.id];d=q.init(n,e);if(e){p.processInvalidate(e,q,"before")}if(h.beforeLayoutCycle){h.beforeLayoutCycle(q)}if(j&&j.beforeLayoutCycle){j.beforeLayoutCycle(q)}d=q.initContinue(d);c=true;if(h.getLayoutItems){h.renderChildren();o=h.getLayoutItems();if(o.length){p.invalidate(o,true)}}if(j){c=false;j.renderChildren();o=j.getVisibleItems();if(o.length){p.invalidate(o,true)}}q.initDone(c);p.resetLayout(h,q,a);if(j){p.resetLayout(j,q,a)}q.initAnimation();if(e){p.processInvalidate(e,q,"after")}}}p.currentLayout=null},layoutDone:function(a){var b=a.ownerContext;a.running=false;if(a.isComponentLayout){if(b.measuresBox){b.onBoxMeasured()}b.setProp("done",true)}else{b.setProp("containerLayoutDone",true)}--this.remainingLayouts;++this.progressCount},newQueue:function(){return new Ext.util.Queue()},processInvalidate:function(b,e,a){if(b[a]){var d=this,c=d.currentLayout;d.currentLayout=b.layout||null;b[a](e,b);d.currentLayout=c}},queueAnimation:function(a){this.animateQueue.add(a)},queueCompletion:function(a){this.completionQueue.add(a)},queueFinalize:function(a){this.finalizeQueue.add(a)},queueFlush:function(a){this.flushQueue.add(a)},chainFns:function(a,i,g){var d=this,c=a.layout,e=i.layout,b=a[g],h=i[g];return function(j){var k=d.currentLayout;if(b){d.currentLayout=c;b.call(a.scope||a,j,a)}d.currentLayout=e;h.call(i.scope||i,j,i);d.currentLayout=k}},queueInvalidate:function(k,l){var h=this,j=[],i=h.invalidQueue,g=i.length,d,b,e,a,c;if(k.isComponent){k=h.getCmp(d=k)}else{d=k.target}k.invalid=true;while(g--){b=i[g];e=b.item.target;if(d.isDescendant(e)){return}if(e==d){if(!(a=b.options)){b.options=l}else{if(l){if(l.widthModel){a.widthModel=l.widthModel}if(l.heightModel){a.heightModel=l.heightModel}if(!(c=a.state)){a.state=l.state}else{if(l.state){Ext.apply(c,l.state)}}if(l.before){a.before=h.chainFns(a,l,"before")}if(l.after){a.after=h.chainFns(a,l,"after")}}}return}if(!e.isDescendant(d)){j.push(b)}}j.push({item:k,options:l});h.invalidQueue=j},queueItemLayouts:function(c){var a=c.isComponent?c:c.target,b=a.componentLayout;if(!b.pending&&!b.invalid&&!b.done){this.queueLayout(b)}b=a.layout;if(b&&!b.pending&&!b.invalid&&!b.done){this.queueLayout(b)}},queueLayout:function(a){this.layoutQueue.add(a);a.pending=true},removeEl:function(d,c){var e=c.id,b=d.children,a=this.items;if(b){Ext.Array.remove(b,a[e])}delete a[e]},resetLayout:function(b,c,d){var a=this;a.currentLayout=b;b.done=false;b.pending=true;b.firedTriggers=0;a.layoutQueue.add(b);if(d){a.layouts[b.id]=b;b.running=true;if(b.finishedLayout){a.finishQueue.add(b)}++a.remainingLayouts;++b.layoutCount;b.ownerContext=c;b.beginCount=0;b.blockCount=0;b.calcCount=0;b.triggerCount=0;if(!b.initialized){b.initLayout()}b.beginLayout(c)}else{++b.beginCount;if(!b.running){++a.remainingLayouts;b.running=true;if(b.isComponentLayout){c.unsetProp("done")}a.completionQueue.remove(b);a.finalizeQueue.remove(b)}}b.beginLayoutCycle(c,d)},run:function(){var c=this,b=false,a=100;c.flushInvalidates();c.state=1;c.totalCount=c.layoutQueue.getCount();c.flush();while((c.remainingLayouts||c.invalidQueue.length)&&a--){if(c.invalidQueue.length){c.flushInvalidates()}if(c.runCycle()){b=false}else{if(!b){c.flush();b=true;c.flushLayouts("completionQueue","completeLayout")}else{if(!c.invalidQueue.length){c.state=2;break}}}if(!(c.remainingLayouts||c.invalidQueue.length)){c.flush();c.flushLayouts("completionQueue","completeLayout");c.flushLayouts("finalizeQueue","finalizeLayout")}}return c.runComplete()},runComplete:function(){var a=this;a.state=2;if(a.remainingLayouts){a.handleFailure();return false}a.flush();a.flushLayouts("finishQueue","finishedLayout",true);a.flushLayouts("finishQueue","notifyOwner");a.flush();a.flushAnimations();return true},runCycle:function(){var c=this,d=c.layoutQueue.clear(),b=d.length,a;++c.cycleCount;c.progressCount=0;for(a=0;a<b;++a){c.runLayout(c.currentLayout=d[a])}c.currentLayout=null;return c.progressCount>0},runLayout:function(b){var a=this,c=a.getCmp(b.owner);b.pending=false;if(c.state.blocks){return}b.done=true;++b.calcCount;++a.calcCount;b.calculate(c);if(b.done){a.layoutDone(b);if(b.completeLayout){a.queueCompletion(b)}if(b.finalizeLayout){a.queueFinalize(b)}}else{if(!b.pending&&!b.invalid&&!(b.blockCount+b.triggerCount-b.firedTriggers)){a.queueLayout(b)}}},setItemSize:function(h,g,b){var d=h,a=1,c,e;if(h.isComposite){d=h.elements;a=d.length;h=d[0]}else{if(!h.dom&&!h.el){a=d.length;h=d[0]}}for(e=0;e<a;){c=this.get(h);c.setSize(g,b);h=d[++e]}}});Ext.define("Ext.layout.component.Body",{alias:["layout.body"],extend:Ext.layout.component.Auto,type:"body",beginLayout:function(a){this.callParent(arguments);a.bodyContext=a.getEl("body")},beginLayoutCycle:function(d,b){var c=this,g=c.lastWidthModel,e=c.lastHeightModel,a=c.owner.body;c.callParent(arguments);if(g&&g.fixed&&d.widthModel.shrinkWrap){a.setWidth(null)}if(e&&e.fixed&&d.heightModel.shrinkWrap){a.setHeight(null)}},calculateOwnerHeightFromContentHeight:function(c,b){var a=this.callParent(arguments);if(c.targetContext!=c){a+=c.getPaddingInfo().height}return a},calculateOwnerWidthFromContentWidth:function(c,a){var b=this.callParent(arguments);if(c.targetContext!=c){b+=c.getPaddingInfo().width}return b},measureContentWidth:function(a){return a.bodyContext.setWidth(a.bodyContext.el.dom.offsetWidth,false)},measureContentHeight:function(a){return a.bodyContext.setHeight(a.bodyContext.el.dom.offsetHeight,false)},publishInnerHeight:function(c,a){var d=a-c.getFrameInfo().height,b=c.targetContext;if(b!=c){d-=c.getPaddingInfo().height}return c.bodyContext.setHeight(d,!c.heightModel.natural)},publishInnerWidth:function(d,c){var a=c-d.getFrameInfo().width,b=d.targetContext;if(b!=d){a-=d.getPaddingInfo().width}d.bodyContext.setWidth(a,!d.widthModel.natural)}});Ext.define("Ext.layout.component.FieldSet",{extend:Ext.layout.component.Body,alias:["layout.fieldset"],type:"fieldset",defaultCollapsedWidth:100,beforeLayoutCycle:function(a){if(a.target.collapsed){a.heightModel=this.sizeModels.shrinkWrap}},beginLayoutCycle:function(b){var c=b.target,a;this.callParent(arguments);if(c.collapsed){b.setContentHeight(0);b.restoreMinHeight=c.minHeight;delete c.minHeight;if(b.widthModel.shrinkWrap){a=c.lastComponentSize;b.setContentWidth((a&&a.contentWidth)||this.defaultCollapsedWidth)}}},finishedLayout:function(c){var a=this.owner,b=c.restoreMinHeight;this.callParent(arguments);if(b){a.minHeight=b}},calculateOwnerHeightFromContentHeight:function(d,c){var a=d.getBorderInfo(),b=d.target.legend;return d.getProp("contentHeight")+d.getPaddingInfo().height+((Ext.isIEQuirks||Ext.isIE8m)?d.bodyContext.getPaddingInfo().top:0)+(b?b.getHeight():a.top)+a.bottom},publishInnerHeight:function(c,a){var b=c.target.legend;if(b){a-=b.getHeight()}this.callParent([c,a])},getLayoutItems:function(){var a=this.owner.legend;return a?[a]:[]}});Ext.define("Ext.layout.component.field.Slider",{alias:["layout.sliderfield"],extend:Ext.layout.component.field.Field,type:"sliderfield",beginLayout:function(a){this.callParent(arguments);a.endElContext=a.getEl("endEl");a.innerElContext=a.getEl("innerEl");a.bodyElContext=a.getEl("bodyEl")},publishInnerHeight:function(d,a){var e=a-this.measureLabelErrorHeight(d),c,b;if(this.owner.vertical){c=d.endElContext.getPaddingInfo();b=d.inputContext.getPaddingInfo();d.innerElContext.setHeight(e-b.height-c.height)}else{d.bodyElContext.setHeight(e)}},publishInnerWidth:function(d,c){if(!this.owner.vertical){var b=d.endElContext.getPaddingInfo(),a=d.inputContext.getPaddingInfo();d.innerElContext.setWidth(c-a.left-b.right-d.labelContext.getProp("width"))}},beginLayoutFixed:function(d,a,e){var b=this,c=b.ieInputWidthAdjustment;if(c){b.owner.bodyEl.setStyle("padding-right",c+"px")}b.callParent(arguments)}});Ext.define("Ext.layout.container.Absolute",{alias:"layout.absolute",extend:Ext.layout.container.Anchor,alternateClassName:"Ext.layout.AbsoluteLayout",targetCls:Ext.baseCSSPrefix+"abs-layout-ct",itemCls:Ext.baseCSSPrefix+"abs-layout-item",ignoreOnContentChange:true,type:"absolute",adjustWidthAnchor:function(c,b){var d=this.targetPadding,a=b.getStyle("left");return c-a+d.left},adjustHeightAnchor:function(b,a){var c=this.targetPadding,d=a.getStyle("top");return b-d+c.top},isItemLayoutRoot:function(a){return this.ignoreOnContentChange||this.callParent(arguments)},isItemShrinkWrap:function(a){return true},beginLayout:function(b){var a=this,c=a.getTarget();a.callParent(arguments);if(c.dom!==document.body){c.position()}a.targetPadding=b.targetContext.getPaddingInfo()},isItemBoxParent:function(a){return true},onContentChange:function(){if(this.ignoreOnContentChange){return false}return this.callParent(arguments)},calculateContentSize:function(m,k){var u=this,d=(k||0)|((m.widthModel.shrinkWrap?1:0)|(m.heightModel.shrinkWrap?2:0)),c=(d&1)||undefined,h=(d&2)||undefined,b=m.childItems,g=b.length,r=0,p=0,l=0,e=m.props,t,j,n,o,s,a,q;if(c){if(isNaN(e.contentWidth)){++l}else{c=undefined}}if(h){if(isNaN(e.contentHeight)){++l}else{h=undefined}}if(l){for(s=0;s<g;++s){n=b[s];j=n.target;o=h&&n.getProp("height");q=c&&n.getProp("width");a=n.getMarginInfo();o+=a.bottom;q+=a.right;r=Math.max(r,(j.y||0)+o);p=Math.max(p,(j.x||0)+q);if(isNaN(r)&&isNaN(p)){u.done=false;return}}if(c||h){t=m.targetContext.getPaddingInfo()}if(c&&!m.setContentWidth(p+t.width)){u.done=false}if(h&&!m.setContentHeight(r+t.height)){u.done=false}}}});Ext.define("Ext.layout.container.Accordion",{extend:Ext.layout.container.VBox,alias:["layout.accordion"],alternateClassName:"Ext.layout.AccordionLayout",targetCls:Ext.baseCSSPrefix+"accordion-layout-ct",itemCls:[Ext.baseCSSPrefix+"box-item",Ext.baseCSSPrefix+"accordion-item"],align:"stretch",fill:true,titleCollapse:true,hideCollapseTool:false,collapseFirst:undefined,animate:true,activeOnTop:false,multi:false,defaultAnimatePolicy:{y:true,height:true},constructor:function(){var a=this;a.callParent(arguments);if(!a.multi&&a.animate){a.animatePolicy=Ext.apply({},a.defaultAnimatePolicy)}else{a.animatePolicy=null}},beforeRenderItems:function(h){var j=this,g=h.length,c=0,b=j.owner,k=j.collapseFirst,a=Ext.isDefined(k),l=j.getExpanded(true)[0],e=j.multi,d;for(;c<g;c++){d=h[c];if(!d.rendered){if(!e||d.collapsible!==false){d.collapsible=true}if(d.collapsible){if(a){d.collapseFirst=k}if(j.hideCollapseTool){d.hideCollapseTool=j.hideCollapseTool;d.titleCollapse=true}else{if(j.titleCollapse&&d.titleCollapse===undefined){d.titleCollapse=j.titleCollapse}}}delete d.hideHeader;delete d.width;d.title=d.title||"&#160;";d.addBodyCls(Ext.baseCSSPrefix+"accordion-body");if(!e){if(l){d.collapsed=l!==d}else{if(d.hasOwnProperty("collapsed")&&d.collapsed===false){l=d}else{d.collapsed=true}}b.mon(d,{show:j.onComponentShow,beforeexpand:j.onComponentExpand,beforecollapse:j.onComponentCollapse,scope:j})}b.mon(d,"beforecollapse",j.onComponentCollapse,j);d.headerOverCls=Ext.baseCSSPrefix+"accordion-hd-over"}}if(!e){if(!l){if(g){h[0].collapsed=false}}else{if(j.activeOnTop){l.collapsed=false;j.configureItem(l);if(b.items.indexOf(l)>0){b.insert(0,l)}}}}},getItemsRenderTree:function(a){this.beforeRenderItems(a);return this.callParent(arguments)},renderItems:function(a,b){this.beforeRenderItems(a);this.callParent(arguments)},configureItem:function(a){this.callParent(arguments);a.animCollapse=a.border=false;if(this.fill){a.flex=1}},beginLayout:function(a){this.callParent(arguments);this.updatePanelClasses(a)},updatePanelClasses:function(e){var c=e.visibleItems,d=c.length,a=true,b,h,g;for(b=0;b<d;b++){h=c[b];g=h.header;g.addCls(Ext.baseCSSPrefix+"accordion-hd");if(a){g.removeCls(Ext.baseCSSPrefix+"accordion-hd-sibling-expanded")}else{g.addCls(Ext.baseCSSPrefix+"accordion-hd-sibling-expanded")}if(b+1==d&&h.collapsed){g.addCls(Ext.baseCSSPrefix+"accordion-hd-last-collapsed")}else{g.removeCls(Ext.baseCSSPrefix+"accordion-hd-last-collapsed")}a=h.collapsed}},onComponentExpand:function(c){var j=this,b=j.owner,g=j.multi,a=j.animate,k=!g&&!j.animate&&j.activeOnTop,h,l,e,d;if(!j.processing){j.processing=true;d=b.deferLayouts;b.deferLayouts=true;h=g?[]:j.getExpanded();l=h.length;for(e=0;e<l;e++){h[e].collapse()}if(k){Ext.suspendLayouts();b.insert(0,c);Ext.resumeLayouts()}b.deferLayouts=d;j.processing=false}},onComponentCollapse:function(d){var e=this,a=e.owner,g,c,b;if(e.owner.items.getCount()===1){return false}if(!e.processing){e.processing=true;b=a.deferLayouts;a.deferLayouts=true;g=d.next()||d.prev();if(e.multi){c=e.getExpanded();if(c.length===1){g.expand()}}else{if(g){g.expand()}}a.deferLayouts=b;e.processing=false}},onComponentShow:function(a){this.onComponentExpand(a)},getExpanded:function(h){var b=this.owner.items.items,a=b.length,d=0,c=[],g,e;for(;d<a;++d){e=b[d];if(h){g=e.hasOwnProperty("collapsed")&&e.collapsed===false}else{g=!e.collapsed}if(g){c.push(e)}}return c}});Ext.define("Ext.resizer.Splitter",{extend:Ext.Component,alias:"widget.splitter",childEls:["collapseEl"],renderTpl:['<tpl if="collapsible===true">','<div id="{id}-collapseEl" class="',Ext.baseCSSPrefix,"collapse-el ",Ext.baseCSSPrefix,'layout-split-{collapseDir}{childElCls}">&#160;',"</div>","</tpl>"],baseCls:Ext.baseCSSPrefix+"splitter",collapsedClsInternal:Ext.baseCSSPrefix+"splitter-collapsed",canResize:true,collapsible:false,collapseOnDblClick:true,defaultSplitMin:40,defaultSplitMax:1000,collapseTarget:"next",horizontal:false,vertical:false,size:5,getTrackerConfig:function(){return{xclass:"Ext.resizer.SplitterTracker",el:this.el,splitter:this}},beforeRender:function(){var d=this,e=d.getCollapseTarget(),g=d.getCollapseDirection(),c=d.vertical,b=c?"width":"height",h=c?"height":"width",a;d.callParent();if(!d.hasOwnProperty(h)){d[h]="100%"}if(!d.hasOwnProperty(b)){d[b]=d.size}if(e.collapsed){d.addCls(d.collapsedClsInternal)}a=d.baseCls+"-"+d.orientation;d.addCls(a);if(!d.canResize){d.addCls(a+"-noresize")}Ext.applyIf(d.renderData,{collapseDir:g,collapsible:d.collapsible||e.collapsible});d.protoEl.unselectable()},onRender:function(){var a=this;a.callParent(arguments);if(a.performCollapse!==false){if(a.renderData.collapsible){a.mon(a.collapseEl,"click",a.toggleTargetCmp,a)}if(a.collapseOnDblClick){a.mon(a.el,"dblclick",a.toggleTargetCmp,a)}}a.mon(a.getCollapseTarget(),{collapse:a.onTargetCollapse,expand:a.onTargetExpand,beforeexpand:a.onBeforeTargetExpand,beforecollapse:a.onBeforeTargetCollapse,scope:a});if(a.canResize){a.tracker=Ext.create(a.getTrackerConfig());a.relayEvents(a.tracker,["beforedragstart","dragstart","dragend"])}},getCollapseDirection:function(){var g=this,c=g.collapseDirection,e,a,b,d;if(!c){e=g.collapseTarget;if(e.isComponent){c=e.collapseDirection}if(!c){d=g.ownerCt.layout.type;if(e.isComponent){b=g.ownerCt.items;a=Number(b.indexOf(e)==b.indexOf(g)-1)<<1|Number(d=="hbox")}else{a=Number(g.collapseTarget=="prev")<<1|Number(d=="hbox")}c=["bottom","right","top","left"][a]}g.collapseDirection=c}g.orientation=(c=="top"||c=="bottom")?"horizontal":"vertical";g[g.orientation]=true;return c},getCollapseTarget:function(){var a=this;return a.collapseTarget.isComponent?a.collapseTarget:a.collapseTarget=="prev"?a.previousSibling():a.nextSibling()},setCollapseEl:function(b){var a=this.collapseEl;if(a){a.setDisplayed(b)}},onBeforeTargetExpand:function(a){this.setCollapseEl("none")},onBeforeTargetCollapse:function(){this.setCollapseEl("none")},onTargetCollapse:function(a){this.el.addCls([this.collapsedClsInternal,this.collapsedCls]);this.setCollapseEl("")},onTargetExpand:function(a){this.el.removeCls([this.collapsedClsInternal,this.collapsedCls]);this.setCollapseEl("")},toggleTargetCmp:function(d,b){var c=this.getCollapseTarget(),g=c.placeholder,a;if(Ext.isFunction(c.expand)&&Ext.isFunction(c.collapse)){if(g&&!g.hidden){a=true}else{a=!c.hidden}if(a){if(c.collapsed){c.expand()}else{if(c.collapseDirection){c.collapse()}else{c.collapse(this.renderData.collapseDir)}}}}},setSize:function(){var a=this;a.callParent(arguments);if(Ext.isIE&&a.el){a.el.repaint()}},beforeDestroy:function(){Ext.destroy(this.tracker);this.callParent()}});Ext.define("Ext.resizer.BorderSplitter",{extend:Ext.resizer.Splitter,alias:"widget.bordersplitter",collapseTarget:null,getTrackerConfig:function(){var a=this.callParent();a.xclass="Ext.resizer.BorderSplitterTracker";return a}});Ext.define("Ext.layout.container.Border",{alias:"layout.border",extend:Ext.layout.container.Container,alternateClassName:"Ext.layout.BorderLayout",targetCls:Ext.baseCSSPrefix+"border-layout-ct",itemCls:[Ext.baseCSSPrefix+"border-item",Ext.baseCSSPrefix+"box-item"],type:"border",padding:undefined,percentageRe:/(\d+)%/,axisProps:{horz:{borderBegin:"west",borderEnd:"east",horizontal:true,posProp:"x",sizeProp:"width",sizePropCap:"Width"},vert:{borderBegin:"north",borderEnd:"south",horizontal:false,posProp:"y",sizeProp:"height",sizePropCap:"Height"}},centerRegion:null,collapseDirections:{north:"top",south:"bottom",east:"right",west:"left"},manageMargins:true,panelCollapseAnimate:true,panelCollapseMode:"placeholder",regionWeights:{north:20,south:10,center:0,west:-10,east:-20},beginAxis:function(m,b,w){var u=this,c=u.axisProps[w],r=!c.horizontal,l=c.sizeProp,p=0,a=m.childItems,g=a.length,t,q,o,h,s,e,k,n,d,v,j;for(q=0;q<g;++q){o=a[q];s=o.target;o.layoutPos={};if(s.region){o.region=e=s.region;o.isCenter=s.isCenter;o.isHorz=s.isHorz;o.isVert=s.isVert;o.weight=s.weight||u.regionWeights[e]||0;b[s.id]=o;if(s.isCenter){t=o;h=s.flex;m.centerRegion=t;continue}if(r!==o.isVert){continue}o.reverseWeighting=(e==c.borderEnd);n=s[l];d=typeof n;if(!s.collapsed){if(d=="string"&&(k=u.percentageRe.exec(n))){o.percentage=parseInt(k[1],10)}else{if(s.flex){p+=o.flex=s.flex}}}}}if(t){v=t.target;if((j=v.placeholderFor)){if(!h&&r===j.collapsedVertical()){h=0;t.collapseAxis=w}}else{if(v.collapsed&&(r===v.collapsedVertical())){h=0;t.collapseAxis=w}}}if(h==null){h=1}p+=h;return Ext.apply({before:r?"top":"left",totalFlex:p},c)},beginLayout:function(d){var l=this,k=l.getLayoutItems(),e=l.padding,m=typeof e,p=false,q,o,b,h,g,a,c,j,n;if(e){if(m=="string"||m=="number"){e=Ext.util.Format.parseBox(e)}}else{e=d.getEl("getTargetEl").getPaddingInfo();p=true}d.outerPad=e;d.padOnContainer=p;for(h=0,b=k.length;h<b;++h){o=k[h];a=l.getSplitterTarget(o);if(a){c=undefined;j=!!o.hidden;if(!a.split){if(a.isCollapsingOrExpanding){c=!!a.collapsed}}else{if(j!==a.hidden){c=!a.hidden}}if(c===true){o.show()}else{if(c===false){o.hide()}}}}l.callParent(arguments);k=d.childItems;b=k.length;g={};d.borderAxisHorz=l.beginAxis(d,g,"horz");d.borderAxisVert=l.beginAxis(d,g,"vert");for(h=0;h<b;++h){q=k[h];a=l.getSplitterTarget(q.target);if(a){n=g[a.id];if(!n){n=d.getEl(a.el,l);n.region=a.region}q.collapseTarget=a=n;q.weight=a.weight;q.reverseWeighting=a.reverseWeighting;a.splitter=q;q.isHorz=a.isHorz;q.isVert=a.isVert}}l.sortWeightedItems(k,"reverseWeighting");l.setupSplitterNeighbors(k)},calculate:function(d){var m=this,a=m.getContainerSize(d),j=d.childItems,c=j.length,b=d.borderAxisHorz,k=d.borderAxisVert,e=d.outerPad,o=d.padOnContainer,h,q,l,p,n,g;b.begin=e.left;k.begin=e.top;n=b.end=b.flexSpace=a.width+(o?e.left:-e.right);g=k.end=k.flexSpace=a.height+(o?e.top:-e.bottom);for(h=0;h<c;++h){q=j[h];l=q.getMarginInfo();if(q.isHorz||q.isCenter){b.addUnflexed(l.width);n-=l.width}if(q.isVert||q.isCenter){k.addUnflexed(l.height);g-=l.height}if(!q.flex&&!q.percentage){if(q.isHorz||(q.isCenter&&q.collapseAxis==="horz")){p=q.getProp("width");b.addUnflexed(p);if(q.collapseTarget){n-=p}}else{if(q.isVert||(q.isCenter&&q.collapseAxis==="vert")){p=q.getProp("height");k.addUnflexed(p);if(q.collapseTarget){g-=p}}}}}for(h=0;h<c;++h){q=j[h];l=q.getMarginInfo();if(q.percentage){if(q.isHorz){p=Math.ceil(n*q.percentage/100);p=q.setWidth(p);b.addUnflexed(p)}else{if(q.isVert){p=Math.ceil(g*q.percentage/100);p=q.setHeight(p);k.addUnflexed(p)}}}}for(h=0;h<c;++h){q=j[h];if(!q.isCenter){m.calculateChildAxis(q,b);m.calculateChildAxis(q,k)}}if(m.finishAxis(d,k)+m.finishAxis(d,b)<2){m.done=false}else{m.finishPositions(j)}},calculateChildAxis:function(l,c){var a=l.collapseTarget,h="set"+c.sizePropCap,e=c.sizeProp,d=l.getMarginInfo()[e],j,b,g,i,k;if(a){j=a.region}else{j=l.region;g=l.flex}b=j==c.borderBegin;if(!b&&j!=c.borderEnd){l[h](c.end-c.begin-d);i=c.begin}else{if(g){k=Math.ceil(c.flexSpace*(g/c.totalFlex));k=l[h](k)}else{if(l.percentage){k=l.peek(e)}else{k=l.getProp(e)}}k+=d;if(b){i=c.begin;c.begin+=k}else{c.end=i=c.end-k}}l.layoutPos[c.posProp]=i},finishAxis:function(d,c){var b=c.end-c.begin,a=d.centerRegion;if(a){a["set"+c.sizePropCap](b-a.getMarginInfo()[c.sizeProp]);a.layoutPos[c.posProp]=c.begin}return Ext.isNumber(b)?1:0},finishPositions:function(d){var c=d.length,b,a;for(b=0;b<c;++b){a=d[b];a.setProp("x",a.layoutPos.x+a.marginInfo.left);a.setProp("y",a.layoutPos.y+a.marginInfo.top)}},getLayoutItems:function(){var a=this.owner,e=(a&&a.items&&a.items.items)||[],d=e.length,b=[],c=0,g,h;for(;c<d;c++){g=e[c];h=g.placeholderFor;if(g.hidden||((!g.floated||g.isCollapsingOrExpanding===2)&&!(h&&h.isCollapsingOrExpanding===2))){b.push(g)}}return b},getPlaceholder:function(a){return a.getPlaceholder&&a.getPlaceholder()},getSplitterTarget:function(b){var a=b.collapseTarget;if(a&&a.collapsed){return a.placeholder||a}return a},isItemBoxParent:function(a){return true},isItemShrinkWrap:function(a){return true},insertSplitter:function(c,b,e){var g=c.region,d={xtype:"bordersplitter",collapseTarget:c,id:c.id+"-splitter",hidden:e,canResize:c.splitterResize!==false},a=b+((g=="south"||g=="east")?0:1);if(c.isHorz){d.height=null}else{d.width=null}if(c.collapseMode=="mini"){d.collapsedCls=c.collapsedCls}c.splitter=this.owner.add(a,d)},onAdd:function(d,a){var c=this,h=d.placeholderFor,g=d.region,b,e;c.callParent(arguments);if(g){Ext.apply(d,c.regionFlags[g]);if(g=="center"){c.centerRegion=d}else{d.collapseDirection=this.collapseDirections[g];b=d.split;e=!!d.hidden;if((d.isHorz||d.isVert)&&(b||d.collapseMode=="mini")){c.insertSplitter(d,a,e||!b)}}if(!d.hasOwnProperty("collapseMode")){d.collapseMode=c.panelCollapseMode}if(!d.hasOwnProperty("animCollapse")){if(d.collapseMode!="placeholder"){d.animCollapse=false}else{d.animCollapse=c.panelCollapseAnimate}}}else{if(h){Ext.apply(d,c.regionFlags[h.region]);d.region=h.region;d.weight=h.weight}}},onDestroy:function(){this.centerRegion=null;this.callParent()},onRemove:function(b){var a=this,d=b.region,c=b.splitter;if(d){if(b.isCenter){a.centerRegion=null}delete b.isCenter;delete b.isHorz;delete b.isVert;if(c){a.owner.doRemove(c,true);delete b.splitter}}a.callParent(arguments)},regionFlags:{center:{isCenter:true,isHorz:false,isVert:false},north:{isCenter:false,isHorz:false,isVert:true},south:{isCenter:false,isHorz:false,isVert:true},west:{isCenter:false,isHorz:true,isVert:false},east:{isCenter:false,isHorz:true,isVert:false}},setupSplitterNeighbors:function(m){var p={},e=m.length,o=this.touchedRegions,h,g,a,l,d,k,n,b,c;for(h=0;h<e;++h){k=m[h].target;n=k.region;if(k.isCenter){a=k}else{if(n){c=o[n];for(g=0,l=c.length;g<l;++g){d=p[c[g]];if(d){d.neighbors.push(k)}}if(k.placeholderFor){b=k.placeholderFor.splitter}else{b=k.splitter}if(b){b.neighbors=[]}p[n]=b}}}if(a){c=o.center;for(g=0,l=c.length;g<l;++g){d=p[c[g]];if(d){d.neighbors.push(a)}}}},touchedRegions:{center:["north","south","east","west"],north:["north","east","west"],south:["south","east","west"],east:["east","north","south"],west:["west","north","south"]},sizePolicies:{vert:{readsWidth:0,readsHeight:1,setsWidth:1,setsHeight:0},horz:{readsWidth:1,readsHeight:0,setsWidth:0,setsHeight:1},flexAll:{readsWidth:0,readsHeight:0,setsWidth:1,setsHeight:1}},getItemSizePolicy:function(e){var d=this,a=this.sizePolicies,c,b,g,h;if(e.isCenter){h=e.placeholderFor;if(h){if(h.collapsedVertical()){return a.vert}return a.horz}if(e.collapsed){if(e.collapsedVertical()){return a.vert}return a.horz}return a.flexAll}c=e.collapseTarget;if(c){return c.isVert?a.vert:a.horz}if(e.region){if(e.isVert){b=e.height;g=a.vert}else{b=e.width;g=a.horz}if(e.flex||(typeof b=="string"&&d.percentageRe.test(b))){return a.flexAll}return g}return d.autoSizePolicy}},function(){var a={addUnflexed:function(c){this.flexSpace=Math.max(this.flexSpace-c,0)}},b=this.prototype.axisProps;Ext.apply(b.horz,a);Ext.apply(b.vert,a)});Ext.define("Ext.layout.container.Card",{extend:Ext.layout.container.Fit,alternateClassName:"Ext.layout.CardLayout",alias:"layout.card",type:"card",hideInactive:true,deferredRender:false,getRenderTree:function(){var a=this,b=a.getActiveItem();if(b){if(b.hasListeners.beforeactivate&&b.fireEvent("beforeactivate",b)===false){b=a.activeItem=a.owner.activeItem=null}else{if(b.hasListeners.activate){b.on({boxready:function(){b.fireEvent("activate",b)},single:true})}}if(a.deferredRender){if(b){return a.getItemsRenderTree([b])}}else{return a.callParent(arguments)}}},renderChildren:function(){var a=this,b=a.getActiveItem();if(!a.deferredRender){a.callParent()}else{if(b){a.renderItems([b],a.getRenderTarget())}}},isValidParent:function(c,d,a){var b=c.el?c.el.dom:Ext.getDom(c);return(b&&b.parentNode===(d.dom||d))||false},getActiveItem:function(){var b=this,a=b.parseActiveItem(b.activeItem||(b.owner&&b.owner.activeItem));if(a&&b.owner.items.indexOf(a)!=-1){b.activeItem=a}else{b.activeItem=null}return b.activeItem},parseActiveItem:function(a){if(a&&a.isComponent){return a}else{if(typeof a=="number"||a===undefined){return this.getLayoutItems()[a||0]}else{return this.owner.getComponent(a)}}},configureItem:function(a){if(a===this.getActiveItem()){a.hidden=false}else{a.hidden=true}this.callParent(arguments)},onRemove:function(a){var b=this;if(a===b.activeItem){b.activeItem=null}},getAnimation:function(b,a){var c=(b||{}).cardSwitchAnimation;if(c===false){return false}return c||a.cardSwitchAnimation},getNext:function(){var c=arguments[0],a=this.getLayoutItems(),b=Ext.Array.indexOf(a,this.activeItem);return a[b+1]||(c?a[0]:false)},next:function(){var b=arguments[0],a=arguments[1];return this.setActiveItem(this.getNext(a),b)},getPrev:function(){var c=arguments[0],a=this.getLayoutItems(),b=Ext.Array.indexOf(a,this.activeItem);return a[b-1]||(c?a[a.length-1]:false)},prev:function(){var b=arguments[0],a=arguments[1];return this.setActiveItem(this.getPrev(a),b)},setActiveItem:function(b){var e=this,a=e.owner,d=e.activeItem,g=a.rendered,c;b=e.parseActiveItem(b);c=a.items.indexOf(b);if(c==-1){c=a.items.items.length;Ext.suspendLayouts();b=a.add(b);Ext.resumeLayouts()}if(b&&d!=b){if(b.fireEvent("beforeactivate",b,d)===false){return false}if(d&&d.fireEvent("beforedeactivate",d,b)===false){return false}if(g){Ext.suspendLayouts();if(!b.rendered){e.renderItem(b,e.getRenderTarget(),a.items.length)}if(d){if(e.hideInactive){d.hide();d.hiddenByLayout=true}d.fireEvent("deactivate",d,b)}if(b.hidden){b.show()}if(!b.hidden){e.activeItem=b}Ext.resumeLayouts(true)}else{e.activeItem=b}b.fireEvent("activate",b,d);return e.activeItem}return false}});Ext.define("Ext.layout.container.Column",{extend:Ext.layout.container.Auto,alias:["layout.column"],alternateClassName:"Ext.layout.ColumnLayout",type:"column",itemCls:Ext.baseCSSPrefix+"column",targetCls:Ext.baseCSSPrefix+"column-layout-ct",columnWidthSizePolicy:{readsWidth:0,readsHeight:1,setsWidth:1,setsHeight:0},createsInnerCt:true,manageOverflow:true,isItemShrinkWrap:function(a){return true},getItemSizePolicy:function(a,b){if(a.columnWidth){if(!b){b=this.owner.getSizeModel()}if(!b.width.shrinkWrap){return this.columnWidthSizePolicy}}return this.autoSizePolicy},calculateItems:function(d,a){var o=this,e=d.targetContext,n=d.childItems,l=n.length,b=0,g=a.gotWidth,j,p,h,c,k,m;if(g===false){e.domBlock(o,"width");j=true}else{if(g){p=a.width}else{return true}}for(h=0;h<l;++h){c=n[h];k=c.getMarginInfo().width;if(!c.widthModel.calculated){m=c.getProp("width");if(typeof m!="number"){c.block(o,"width");j=true}b+=m+k}}if(!j){p=(p<b)?0:p-b;for(h=0;h<l;++h){c=n[h];if(c.widthModel.calculated){k=c.marginInfo.width;m=c.target.columnWidth;m=Math.floor(m*p)-k;m=c.setWidth(m);b+=m+k}}d.setContentWidth(b+d.paddingContext.getPaddingInfo().width)}return !j},setCtSizeIfNeeded:function(b,d){var a=this,c=b.paddingContext.getPaddingInfo();a.callParent(arguments);if((Ext.isIEQuirks||Ext.isIE7m)&&a.isShrinkWrapTpl&&c.right){b.outerCtContext.setProp("width",d.width+c.left)}}});Ext.define("Ext.layout.container.Form",{alias:"layout.form",extend:Ext.layout.container.Container,alternateClassName:"Ext.layout.FormLayout",tableCls:Ext.baseCSSPrefix+"form-layout-table",type:"form",createsInnerCt:true,manageOverflow:true,lastOverflowAdjust:{width:0,height:0},childEls:["formTable"],padRow:'<tr><td class="'+Ext.baseCSSPrefix+'form-item-pad" colspan="3"></td></tr>',renderTpl:['<table id="{ownerId}-formTable" class="{tableCls}" style="width:100%" cellpadding="0">',"{%this.renderBody(out,values)%}","</table>","{%this.renderPadder(out,values)%}"],getRenderData:function(){var a=this.callParent();a.tableCls=this.tableCls;return a},calculate:function(g){var e=this,j=e.getContainerSize(g,true),a,h,b=0,d,c=g.sizeModel.height.shrinkWrap;if(c){if(g.hasDomProp("containerChildrenSizeDone")){g.setProp("contentHeight",e.formTable.dom.offsetHeight+g.targetContext.getPaddingInfo().height)}else{e.done=false}}if(j.gotWidth){a=e.formTable.dom.offsetWidth;h=g.childItems;for(d=h.length;b<d;++b){h[b].setWidth(a,false)}}else{e.done=false}},getRenderTarget:function(){return this.formTable},getRenderTree:function(){var d=this,b=d.callParent(arguments),c,a;for(c=0,a=b.length;c<a;c++){b[c]=d.transformItemRenderTree(b[c])}return b},transformItemRenderTree:function(a){if(a.tag&&a.tag=="table"){a.tag="tbody";delete a.cellspacing;delete a.cellpadding;if(Ext.isIE6){a.cn=this.padRow}return a}return{tag:"tbody",cn:{tag:"tr",cn:{tag:"td",colspan:3,style:"width:100%",cn:a}}}},isValidParent:function(b,c,a){return true},isItemShrinkWrap:function(a){return((a.shrinkWrap===true)?3:a.shrinkWrap||0)&2},getItemSizePolicy:function(a){return{setsWidth:1,setsHeight:0}},beginLayoutCycle:function(b,a){var c=this.overflowPadderEl;if(c){c.setStyle("display","none")}if(!b.state.overflowAdjust){b.state.overflowAdjust=this.lastOverflowAdjust}},calculateOverflow:function(n,r,g){var v=this,m=n.targetContext,k=v.manageOverflow,c=n.state,l=c.overflowAdjust,e,j,b,o,a,s,i,q,d,p,t,h,u;if(k&&!c.secondPass&&!v.reserveScrollbar){h=(v.getOverflowXStyle(n)==="auto");u=(v.getOverflowYStyle(n)==="auto");if(!r.gotWidth){h=false}if(!r.gotHeight){u=false}if(h||u){s=Ext.getScrollbarSize();i=n.peek("contentWidth");q=n.peek("contentHeight");o=m.getPaddingInfo();i-=o.width;q-=o.height;d=r.width;p=r.height;t=v.getScrollbarsNeeded(d,p,i,q);c.overflowState=t;if(typeof g=="number"){t&=~g}l={width:(h&&(t&2))?s.width:0,height:(u&&(t&1))?s.height:0};if(l.width!==v.lastOverflowAdjust.width||l.height!==v.lastOverflowAdjust.height){v.done=false;n.invalidate({state:{overflowAdjust:l,overflowState:c.overflowState,secondPass:true}})}}}if(!v.done){return}b=n.padElContext||(n.padElContext=n.getEl("overflowPadderEl",v));if(b){t=c.overflowState;e=n.peek("contentWidth");j=1;if(t){o=m.getPaddingInfo();a=v.scrollRangeFlags;if((t&2)&&(a&1)){j+=o.bottom}if((t&1)&&(a&4)){e+=o.right}b.setProp("display","");b.setSize(e,j)}else{b.setProp("display","none")}}},completeLayout:function(a){this.lastOverflowAdjust=a.state.overflowAdjust},doRenderPadder:function(b,d){var c=d.$layout,a=c.owner,e=c.getScrollRangeFlags();if(c.manageOverflow){if(e&5){b.push('<div id="',a.id,'-overflowPadderEl" ','style="font-size: 1px; height: 1px; margin-top: -1px; position: relative; z-index: -99999');b.push('"></div>');c.scrollRangeFlags=e}}},getContainerSize:function(d,i,b){var e=d.targetContext,h=e.getFrameInfo(),l=e.getPaddingInfo(),k=0,m=0,a=b?null:d.state.overflowAdjust,g,j,c,n;if(!d.widthModel.shrinkWrap){++m;c=i?e.getDomProp("width"):e.getProp("width");g=(typeof c=="number");if(g){++k;c-=h.width+l.width;if(a){c-=a.width}}}if(!d.heightModel.shrinkWrap){++m;n=i?e.getDomProp("height"):e.getProp("height");j=(typeof n=="number");if(j){++k;n-=h.height+l.height;if(a){n-=a.height}}}return{width:c,height:n,needed:m,got:k,gotAll:k==m,gotWidth:g,gotHeight:j}},getOverflowXStyle:function(b){var a=this;return a.overflowXStyle||(a.overflowXStyle=a.owner.scrollFlags.overflowX||b.targetContext.getStyle("overflow-x"))},getOverflowYStyle:function(b){var a=this;return a.overflowYStyle||(a.overflowYStyle=a.owner.scrollFlags.overflowY||b.targetContext.getStyle("overflow-y"))},getScrollRangeFlags:(function(){var a=-1;return function(){if(a<0){var g=Ext.getBody().createChild({cls:Ext.baseCSSPrefix+"border-box",style:{width:"100px",height:"100px",padding:"10px",overflow:"auto"},children:[{style:{border:"1px solid red",width:"150px",height:"150px",margin:"0 5px 5px 0"}}]}),d=g.dom.scrollHeight,c=g.dom.scrollWidth,e={175:0,165:1,170:2,160:3},b={175:0,165:4,170:8,160:12};a=(e[d]||0)|(b[c]||0);g.remove()}return a}}()),initLayout:function(){var b=this,a=Ext.getScrollbarSize().width;b.callParent();if(a&&b.manageOverflow&&!b.hasOwnProperty("lastOverflowAdjust")){if(b.owner.scrollFlags.y||b.reserveScrollbar){b.lastOverflowAdjust={width:a,height:0}}}},setupRenderTpl:function(a){this.callParent(arguments);a.renderPadder=this.doRenderPadder}});Ext.define("Ext.menu.Item",{extend:Ext.Component,alias:"widget.menuitem",alternateClassName:"Ext.menu.TextItem",activeCls:Ext.baseCSSPrefix+"menu-item-active",ariaRole:"menuitem",canActivate:true,clickHideDelay:1,destroyMenu:true,disabledCls:Ext.baseCSSPrefix+"menu-item-disabled",hideOnClick:true,isMenuItem:true,menuAlign:"tl-tr?",menuExpandDelay:200,menuHideDelay:200,tooltipType:"qtip",arrowCls:Ext.baseCSSPrefix+"menu-item-arrow",childEls:["itemEl","iconEl","textEl","arrowEl"],renderTpl:['<tpl if="plain">',"{text}","<tpl else>",'<a id="{id}-itemEl"',' class="'+Ext.baseCSSPrefix+'menu-item-link{childElCls}"',' href="{href}"','<tpl if="hrefTarget"> target="{hrefTarget}"</tpl>',' hidefocus="true"',' unselectable="on"','<tpl if="tabIndex">',' tabIndex="{tabIndex}"',"</tpl>",">",'<div role="img" id="{id}-iconEl" class="'+Ext.baseCSSPrefix+"menu-item-icon {iconCls}",'{childElCls} {glyphCls}" style="<tpl if="icon">background-image:url({icon});</tpl>','<tpl if="glyph && glyphFontFamily">font-family:{glyphFontFamily};</tpl>">','<tpl if="glyph">&#{glyph};</tpl>',"</div>",'<span id="{id}-textEl" class="'+Ext.baseCSSPrefix+'menu-item-text" unselectable="on">{text}</span>','<img id="{id}-arrowEl" src="{blank}" class="{arrowCls}','{childElCls}"/>',"</a>","</tpl>"],maskOnDisable:false,activate:function(){var a=this;if(!a.activated&&a.canActivate&&a.rendered&&!a.isDisabled()&&a.isVisible()){a.el.addCls(a.activeCls);a.focus();a.activated=true;a.fireEvent("activate",a)}},getFocusEl:function(){return this.itemEl},deactivate:function(){var a=this;if(a.activated){a.el.removeCls(a.activeCls);a.blur();a.hideMenu();a.activated=false;a.fireEvent("deactivate",a)}},deferHideMenu:function(){if(this.menu.isVisible()){this.menu.hide()}},cancelDeferHide:function(){clearTimeout(this.hideMenuTimer)},deferHideParentMenus:function(){var a;Ext.menu.Manager.hideAll();if(!Ext.Element.getActiveElement()){a=this.up(":not([hidden])");if(a){a.focus()}}},expandMenu:function(a){var b=this;if(b.menu){b.cancelDeferHide();if(a===0){b.doExpandMenu()}else{clearTimeout(b.expandMenuTimer);b.expandMenuTimer=Ext.defer(b.doExpandMenu,Ext.isNumber(a)?a:b.menuExpandDelay,b)}}},doExpandMenu:function(){var a=this,b=a.menu;if(a.activated&&(!b.rendered||!b.isVisible())){a.parentMenu.activeChild=b;b.parentItem=a;b.parentMenu=a.parentMenu;b.showBy(a,a.menuAlign)}},getRefItems:function(a){var c=this.menu,b;if(c){b=c.getRefItems(a);b.unshift(c)}return b||[]},hideMenu:function(a){var b=this;if(b.menu){clearTimeout(b.expandMenuTimer);b.hideMenuTimer=Ext.defer(b.deferHideMenu,Ext.isNumber(a)?a:b.menuHideDelay,b)}},initComponent:function(){var b=this,c=Ext.baseCSSPrefix,a=[c+"menu-item"],d;b.addEvents("activate","click","deactivate","textchange","iconchange");if(b.plain){a.push(c+"menu-item-plain")}if(b.cls){a.push(b.cls)}b.cls=a.join(" ");if(b.menu){d=b.menu;delete b.menu;b.setMenu(d)}b.callParent(arguments)},onClick:function(b){var a=this;if(!a.href){b.stopEvent()}if(a.disabled){return}if(a.hideOnClick){a.deferHideParentMenusTimer=Ext.defer(a.deferHideParentMenus,a.clickHideDelay,a)}Ext.callback(a.handler,a.scope||a,[a,b]);a.fireEvent("click",a,b);if(!a.hideOnClick){a.focus()}},onRemoved:function(){var a=this;if(a.activated&&a.parentMenu.activeItem===a){a.parentMenu.deactivateActiveItem()}a.callParent(arguments);a.parentMenu=a.ownerButton=null},beforeDestroy:function(){var a=this;if(a.rendered){a.clearTip()}a.callParent()},onDestroy:function(){var a=this;clearTimeout(a.expandMenuTimer);a.cancelDeferHide();clearTimeout(a.deferHideParentMenusTimer);a.setMenu(null);a.callParent(arguments)},beforeRender:function(){var d=this,h=Ext.BLANK_IMAGE_URL,c=d.glyph,g=Ext._glyphFontFamily,b,a,e;d.callParent();if(d.iconAlign==="right"){a=d.checkChangeDisabled?d.disabledCls:"";e=Ext.baseCSSPrefix+"menu-item-icon-right "+d.iconCls}else{a=(d.iconCls||"")+(d.checkChangeDisabled?" "+d.disabledCls:"");e=d.menu?d.arrowCls:""}if(typeof c==="string"){b=c.split("@");c=b[0];g=b[1]}Ext.applyIf(d.renderData,{href:d.href||"#",hrefTarget:d.hrefTarget,icon:d.icon,iconCls:a,glyph:c,glyphCls:c?Ext.baseCSSPrefix+"menu-item-glyph":undefined,glyphFontFamily:g,hasIcon:!!(d.icon||d.iconCls||c),iconAlign:d.iconAlign,plain:d.plain,text:d.text,arrowCls:e,blank:h,tabIndex:d.tabIndex})},onRender:function(){var a=this;a.callParent(arguments);if(a.tooltip){a.setTooltip(a.tooltip,true)}},setMenu:function(e,d){var c=this,b=c.menu,a=c.arrowEl;if(b){delete b.parentItem;delete b.parentMenu;delete b.ownerItem;if(d===true||(d!==false&&c.destroyMenu)){Ext.destroy(b)}}if(e){c.menu=Ext.menu.Manager.get(e);c.menu.ownerItem=c}else{c.menu=null}if(c.rendered&&!c.destroying&&a){a[c.menu?"addCls":"removeCls"](c.arrowCls)}},setHandler:function(b,a){this.handler=b||null;this.scope=a},setIcon:function(b){var a=this.iconEl,c=this.icon;if(a){a.src=b||Ext.BLANK_IMAGE_URL}this.icon=b;this.fireEvent("iconchange",this,c,b)},setIconCls:function(b){var d=this,a=d.iconEl,c=d.iconCls;if(a){if(d.iconCls){a.removeCls(d.iconCls)}if(b){a.addCls(b)}}d.iconCls=b;d.fireEvent("iconchange",d,c,b)},setText:function(d){var c=this,b=c.textEl||c.el,a=c.text;c.text=d;if(c.rendered){b.update(d||"");c.ownerCt.updateLayout()}c.fireEvent("textchange",c,a,d)},getTipAttr:function(){return this.tooltipType=="qtip"?"data-qtip":"title"},clearTip:function(){if(Ext.quickTipsActive&&Ext.isObject(this.tooltip)){Ext.tip.QuickTipManager.unregister(this.itemEl)}},setTooltip:function(c,a){var b=this;if(b.rendered){if(!a){b.clearTip()}if(Ext.quickTipsActive&&Ext.isObject(c)){Ext.tip.QuickTipManager.register(Ext.apply({target:b.itemEl.id},c));b.tooltip=c}else{b.itemEl.dom.setAttribute(b.getTipAttr(),c)}}else{b.tooltip=c}return b}});Ext.define("Ext.menu.CheckItem",{extend:Ext.menu.Item,alias:"widget.menucheckitem",checkedCls:Ext.baseCSSPrefix+"menu-item-checked",uncheckedCls:Ext.baseCSSPrefix+"menu-item-unchecked",groupCls:Ext.baseCSSPrefix+"menu-group-icon",hideOnClick:false,checkChangeDisabled:false,childEls:["itemEl","iconEl","textEl","checkEl"],showCheckbox:true,renderTpl:['<tpl if="plain">',"{text}","<tpl else>","{%var showCheckbox = values.showCheckbox,",'      rightCheckbox = showCheckbox && values.hasIcon && (values.iconAlign !== "left"), textCls = rightCheckbox ? "'+Ext.baseCSSPrefix+'right-check-item-text" : "";%}','<a id="{id}-itemEl" class="'+Ext.baseCSSPrefix+'menu-item-link{childElCls}" href="{href}" <tpl if="hrefTarget">target="{hrefTarget}"</tpl> hidefocus="true" unselectable="on"','<tpl if="tabIndex">',' tabIndex="{tabIndex}"',"</tpl>",">",'{%if (values.hasIcon && (values.iconAlign !== "left")) {%}','<div role="img" id="{id}-iconEl" class="'+Ext.baseCSSPrefix+"menu-item-icon {iconCls}",'{childElCls} {glyphCls}" style="<tpl if="icon">background-image:url({icon});</tpl>','<tpl if="glyph && glyphFontFamily">font-family:{glyphFontFamily};</tpl>">','<tpl if="glyph">&#{glyph};</tpl>',"</div>","{%} else if (showCheckbox){%}",'<img id="{id}-checkEl" src="{blank}" class="'+Ext.baseCSSPrefix+'menu-item-icon{childElCls}" />',"{%}%}",'<span id="{id}-textEl" class="'+Ext.baseCSSPrefix+'menu-item-text {[textCls]}{childElCls}" <tpl if="arrowCls">style="margin-right: 17px;"</tpl> >{text}</span>',"{%if (rightCheckbox) {%}",'<img id="{id}-checkEl" src="{blank}" class="'+Ext.baseCSSPrefix+'menu-item-icon-right{childElCls}" />',"{%} else if (values.arrowCls) {%}",'<img id="{id}-arrowEl" src="{blank}" class="{arrowCls}{childElCls}"/>',"{%}%}","</a>","</tpl>"],initComponent:function(){var a=this;a.checked=!!a.checked;a.addEvents("beforecheckchange","checkchange");a.callParent(arguments);Ext.menu.Manager.registerCheckable(a);if(a.group){if(!(a.iconCls||a.icon||a.glyph)){a.iconCls=a.groupCls}if(a.initialConfig.hideOnClick!==false){a.hideOnClick=true}}},beforeRender:function(){this.callParent();this.renderData.showCheckbox=this.showCheckbox},afterRender:function(){var a=this;a.callParent();a.checked=!a.checked;a.setChecked(!a.checked,true);if(a.checkChangeDisabled){a.disableCheckChange()}},disableCheckChange:function(){var b=this,a=b.checkEl;if(a){a.addCls(b.disabledCls)}if(!(Ext.isIE10p||(Ext.isIE9&&Ext.isStrict))&&b.rendered){b.el.repaint()}b.checkChangeDisabled=true},enableCheckChange:function(){var b=this,a=b.checkEl;if(a){a.removeCls(b.disabledCls)}b.checkChangeDisabled=false},onClick:function(b){var a=this;if(!a.disabled&&!a.checkChangeDisabled&&!(a.checked&&a.group)){a.setChecked(!a.checked)}this.callParent([b])},onDestroy:function(){Ext.menu.Manager.unregisterCheckable(this);this.callParent(arguments)},setChecked:function(c,a){var b=this;if(b.checked!==c&&(a||b.fireEvent("beforecheckchange",b,c)!==false)){if(b.el){b.el[c?"addCls":"removeCls"](b.checkedCls)[!c?"addCls":"removeCls"](b.uncheckedCls)}b.checked=c;Ext.menu.Manager.onCheckChange(b,c);if(!a){Ext.callback(b.checkHandler,b.scope,[b,c]);b.fireEvent("checkchange",b,c)}}}});Ext.define("Ext.menu.KeyNav",{extend:Ext.util.KeyNav,constructor:function(a){var b=this;b.menu=a.target;b.callParent([Ext.apply({down:b.down,enter:b.enter,esc:b.escape,left:b.left,right:b.right,space:b.enter,tab:b.tab,up:b.up},a)])},down:function(b){var a=this,c=a.menu.focusedItem;if(c&&b.getKey()==Ext.EventObject.DOWN&&a.isWhitelisted(c)){return true}a.focusNextItem(1)},enter:function(b){var c=this.menu,a=c.focusedItem;if(c.activeItem){c.onClick(b)}else{if(a&&a.isFormField){return true}}},escape:function(a){Ext.menu.Manager.hideAll()},focusNextItem:function(b){var a=this.menu,e=a.items,h=a.focusedItem,g=h?e.indexOf(h):-1,i=g+b,d=e.length,c=0,j;while(c<d&&i!==g){if(i<0){i=d-1}else{if(i>=d){i=0}}j=e.getAt(i);if(a.canActivateItem(j)){a.setActiveItem(j);break}i+=b;++c}},isWhitelisted:function(a){return Ext.FocusManager.isWhitelisted(a)},left:function(a){var b=this.menu,c=b.focusedItem;if(c&&this.isWhitelisted(c)){return true}b.hide();if(b.parentMenu){b.parentMenu.focus()}},right:function(c){var d=this.menu,g=d.focusedItem,a=d.activeItem,b;if(g&&this.isWhitelisted(g)){return true}if(a){b=d.activeItem.menu;if(b){a.expandMenu(0);b.setActiveItem(b.child(":focusable"))}}},tab:function(b){var a=this;if(b.shiftKey){a.up(b)}else{a.down(b)}},up:function(b){var a=this,c=a.menu.focusedItem;if(c&&b.getKey()==Ext.EventObject.UP&&a.isWhitelisted(c)){return true}a.focusNextItem(-1)}});Ext.define("Ext.menu.Separator",{extend:Ext.menu.Item,alias:"widget.menuseparator",canActivate:false,focusable:false,hideOnClick:false,plain:true,separatorCls:Ext.baseCSSPrefix+"menu-item-separator",text:"&#160;",beforeRender:function(a,c){var b=this;b.callParent();b.addCls(b.separatorCls)}});Ext.define("Ext.menu.Menu",{extend:Ext.panel.Panel,alias:"widget.menu",enableKeyNav:true,allowOtherMenus:false,ariaRole:"menu",floating:true,constrain:true,hidden:true,hideMode:"visibility",ignoreParentClicks:false,isMenu:true,showSeparator:true,minWidth:undefined,defaultMinWidth:120,initComponent:function(){var b=this,d=Ext.baseCSSPrefix,a=[d+"menu"],c=b.bodyCls?[b.bodyCls]:[],e=b.floating!==false;b.addEvents("click","mouseenter","mouseleave","mouseover");Ext.menu.Manager.register(b);if(b.plain){a.push(d+"menu-plain")}b.cls=a.join(" ");c.push(d+"menu-body",Ext.dom.Element.unselectableCls);b.bodyCls=c.join(" ");if(!b.layout){b.layout={type:"vbox",align:"stretchmax",overflowHandler:"Scroller"}}if(e){if(b.minWidth===undefined){b.minWidth=b.defaultMinWidth}}else{b.hidden=!!b.initialConfig.hidden}b.callParent(arguments)},registerWithOwnerCt:function(){if(this.floating){this.ownerCt=null;Ext.WindowManager.register(this)}},initHierarchyEvents:Ext.emptyFn,isVisible:function(){return this.callParent()},getHierarchyState:function(){var a=this.callParent();a.hidden=this.hidden;return a},beforeRender:function(){this.callParent(arguments);if(!this.getSizeModel().width.shrinkWrap){this.layout.align="stretch"}},onBoxReady:function(){var a=this;a.callParent(arguments);if(a.showSeparator){a.iconSepEl=a.layout.getElementTarget().insertFirst({cls:Ext.baseCSSPrefix+"menu-icon-separator",html:"&#160;"})}a.mon(a.el,{click:a.onClick,mouseover:a.onMouseOver,scope:a});a.mouseMonitor=a.el.monitorMouseLeave(100,a.onMouseLeave,a);if(a.enableKeyNav){a.keyNav=new Ext.menu.KeyNav({target:a,keyMap:a.getKeyMap()})}},getRefOwner:function(){return this.parentMenu||this.ownerButton||this.callParent(arguments)},canActivateItem:function(a){return a&&!a.isDisabled()&&a.isVisible()&&(a.canActivate||a.getXTypes().indexOf("menuitem")<0)},deactivateActiveItem:function(b){var c=this,d=c.activeItem,a=c.focusedItem;if(d){d.deactivate();if(!d.activated){delete c.activeItem}}if(a&&b){a.blur();delete c.focusedItem}},getFocusEl:function(){return this.focusedItem||this.el},hide:function(){this.deactivateActiveItem(true);this.callParent(arguments)},getItemFromEvent:function(a){return this.getChildByElement(a.getTarget())},lookupComponent:function(b){var a=this;if(typeof b=="string"){b=a.lookupItemFromString(b)}else{if(Ext.isObject(b)){b=a.lookupItemFromObject(b)}}b.minWidth=b.minWidth||a.minWidth;return b},lookupItemFromObject:function(c){var b=this,d=Ext.baseCSSPrefix,a;if(!c.isComponent){if(!c.xtype){c=Ext.create("Ext.menu."+(Ext.isBoolean(c.checked)?"Check":"")+"Item",c)}else{c=Ext.ComponentManager.create(c,c.xtype)}}if(c.isMenuItem){c.parentMenu=b}if(!c.isMenuItem&&!c.dock){a=[d+"menu-item-cmp"];if(!b.plain&&(c.indent!==false||c.iconCls==="no-icon")){a.push(d+"menu-item-indent")}if(c.rendered){c.el.addCls(a)}else{c.cls=(c.cls||"")+" "+a.join(" ")}}return c},lookupItemFromString:function(a){return(a=="separator"||a=="-")?new Ext.menu.Separator():new Ext.menu.Item({canActivate:false,hideOnClick:false,plain:true,text:a})},onClick:function(c){var b=this,a;if(b.disabled){c.stopEvent();return}a=(c.type==="click")?b.getItemFromEvent(c):b.activeItem;if(a&&a.isMenuItem){if(!a.menu||!b.ignoreParentClicks){a.onClick(c)}else{c.stopEvent()}}if(!a||a.disabled){a=undefined}b.fireEvent("click",b,a,c)},onDestroy:function(){var a=this;Ext.menu.Manager.unregister(a);a.parentMenu=a.ownerButton=null;if(a.rendered){a.el.un(a.mouseMonitor);Ext.destroy(a.keyNav);a.keyNav=null}a.callParent(arguments)},onMouseLeave:function(b){var a=this;a.deactivateActiveItem();if(a.disabled){return}a.fireEvent("mouseleave",a,b)},onMouseOver:function(h){var g=this,i=h.getRelatedTarget(),b=!g.el.contains(i),d=g.getItemFromEvent(h),c=g.parentMenu,a=g.parentItem;if(b&&c){c.setActiveItem(a);a.cancelDeferHide();c.mouseMonitor.mouseenter()}if(g.disabled){return}if(d&&!d.activated){g.setActiveItem(d);if(d.activated&&d.expandMenu){d.expandMenu()}}if(b){g.fireEvent("mouseenter",g,h)}g.fireEvent("mouseover",g,d,h)},setActiveItem:function(b){var a=this;if(b&&(b!=a.activeItem)){a.deactivateActiveItem();if(a.canActivateItem(b)){if(b.activate){b.activate();if(b.activated){a.activeItem=b;a.focusedItem=b;a.focus()}}else{b.focus();a.focusedItem=b}}b.el.scrollIntoView(a.layout.getRenderTarget())}},showBy:function(b,d,c){var a=this;a.callParent(arguments);if(!a.hidden){a.setVerticalPosition()}return a},show:function(){var c=this,b,a,d=c.maxHeight;if(!c.rendered){c.doAutoRender()}if(c.floating){b=c.el.parent();a=b.getViewSize().height;c.maxHeight=Math.min(d||a,a)}c.callParent(arguments);c.maxHeight=d;return c},setVerticalPosition:function(){var d=this,g,e=d.getY(),h=e,j=d.getHeight(),b=Ext.Element.getViewportHeight().height,c=d.el.parent(),a=c.getViewSize().height,i=e-c.getScroll().top;c=null;if(d.floating){g=d.maxHeight?d.maxHeight:a-i;if(j>a){h=e-i}else{if(g<j){h=e-(j-g)}else{if((e+j)>b){h=b-j}}}}d.setY(h)}});Ext.define("Ext.menu.ColorPicker",{extend:Ext.menu.Menu,alias:"widget.colormenu",hideOnClick:true,pickerId:null,initComponent:function(){var b=this,a=Ext.apply({},b.initialConfig);delete a.listeners;Ext.apply(b,{plain:true,showSeparator:false,items:Ext.applyIf({cls:Ext.baseCSSPrefix+"menu-color-item",id:b.pickerId,xtype:"colorpicker"},a)});b.callParent(arguments);b.picker=b.down("colorpicker");b.relayEvents(b.picker,["select"]);if(b.hideOnClick){b.on("select",b.hidePickerOnSelect,b)}},hidePickerOnSelect:function(){Ext.menu.Manager.hideAll()}});Ext.define("Ext.menu.DatePicker",{extend:Ext.menu.Menu,alias:"widget.datemenu",hideOnClick:true,pickerId:null,initComponent:function(){var b=this,a=Ext.apply({},b.initialConfig);delete a.listeners;Ext.apply(b,{showSeparator:false,plain:true,border:false,bodyPadding:0,items:Ext.applyIf({cls:Ext.baseCSSPrefix+"menu-date-item",id:b.pickerId,xtype:"datepicker"},a)});b.callParent(arguments);b.picker=b.down("datepicker");b.relayEvents(b.picker,["select"]);if(b.hideOnClick){b.on("select",b.hidePickerOnSelect,b)}},hidePickerOnSelect:function(){Ext.menu.Manager.hideAll()}});Ext.define("Ext.panel.Tool",{extend:Ext.Component,alias:"widget.tool",isTool:true,baseCls:Ext.baseCSSPrefix+"tool",disabledCls:Ext.baseCSSPrefix+"tool-disabled",toolPressedCls:Ext.baseCSSPrefix+"tool-pressed",toolOverCls:Ext.baseCSSPrefix+"tool-over",ariaRole:"button",childEls:["toolEl"],renderTpl:['<img id="{id}-toolEl" src="{blank}" class="{baseCls}-img {baseCls}-{type}{childElCls}" role="presentation"/>'],tooltipType:"qtip",stopEvent:true,height:15,width:15,initComponent:function(){var a=this;a.addEvents("click");a.type=a.type||a.id;Ext.applyIf(a.renderData,{baseCls:a.baseCls,blank:Ext.BLANK_IMAGE_URL,type:a.type});a.tooltip=a.tooltip||a.qtip;a.callParent()},afterRender:function(){var b=this,a;b.callParent(arguments);b.el.on({click:b.onClick,mousedown:b.onMouseDown,mouseover:b.onMouseOver,mouseout:b.onMouseOut,scope:b});if(b.tooltip){if(Ext.quickTipsActive&&Ext.isObject(b.tooltip)){Ext.tip.QuickTipManager.register(Ext.apply({target:b.id},b.tooltip))}else{a=b.tooltipType=="qtip"?"data-qtip":"title";b.el.dom.setAttribute(a,b.tooltip)}}},getFocusEl:function(){return this.el},setType:function(a){var b=this,c=b.type;b.type=a;if(b.rendered){if(c){b.toolEl.removeCls(b.baseCls+"-"+c)}b.toolEl.addCls(b.baseCls+"-"+a)}else{b.renderData.type=a}return b},onClick:function(c,b){var a=this;if(a.disabled){return false}a.el.removeCls(a.toolPressedCls);a.el.removeCls(a.toolOverCls);if(a.stopEvent!==false){c.stopEvent()}Ext.callback(a.handler,a.scope||a,[c,b,a.ownerCt,a]);a.fireEvent("click",a,c);return true},onDestroy:function(){if(Ext.quickTipsActive&&Ext.isObject(this.tooltip)){Ext.tip.QuickTipManager.unregister(this.id)}this.callParent()},onMouseDown:function(){if(this.disabled){return false}this.el.addCls(this.toolPressedCls)},onMouseOver:function(){if(this.disabled){return false}this.el.addCls(this.toolOverCls)},onMouseOut:function(){this.el.removeCls(this.toolOverCls)}});Ext.define("Ext.resizer.SplitterTracker",{extend:Ext.dd.DragTracker,enabled:true,overlayCls:Ext.baseCSSPrefix+"resizable-overlay",createDragOverlay:function(){var a;a=this.overlay=Ext.getBody().createChild({cls:this.overlayCls,html:"&#160;"});a.unselectable();a.setSize(Ext.Element.getViewWidth(true),Ext.Element.getViewHeight(true));a.show()},getPrevCmp:function(){var a=this.getSplitter();return a.previousSibling(":not([hidden])")},getNextCmp:function(){var a=this.getSplitter();return a.nextSibling(":not([hidden])")},onBeforeStart:function(i){var d=this,g=d.getPrevCmp(),a=d.getNextCmp(),c=d.getSplitter().collapseEl,h=i.getTarget(),b;if(!g||!a){return false}if(c&&h===d.getSplitter().collapseEl.dom){return false}if(a.collapsed||g.collapsed){return false}d.prevBox=g.getEl().getBox();d.nextBox=a.getEl().getBox();d.constrainTo=b=d.calculateConstrainRegion();if(!b){return false}return b},onStart:function(b){var a=this.getSplitter();this.createDragOverlay();a.addCls(a.baseCls+"-active")},calculateConstrainRegion:function(){var h=this,a=h.getSplitter(),i=a.getWidth(),j=a.defaultSplitMin,b=a.orientation,e=h.prevBox,k=h.getPrevCmp(),c=h.nextBox,g=h.getNextCmp(),m,l,d;if(b==="vertical"){d={prevCmp:k,nextCmp:g,prevBox:e,nextBox:c,defaultMin:j,splitWidth:i};m=new Ext.util.Region(e.y,h.getVertPrevConstrainRight(d),e.bottom,h.getVertPrevConstrainLeft(d));l=new Ext.util.Region(c.y,h.getVertNextConstrainRight(d),c.bottom,h.getVertNextConstrainLeft(d))}else{m=new Ext.util.Region(e.y+(k.minHeight||j),e.right,(k.maxHeight?e.y+k.maxHeight:c.bottom-(g.minHeight||j))+i,e.x);l=new Ext.util.Region((g.maxHeight?c.bottom-g.maxHeight:e.y+(k.minHeight||j))-i,c.right,c.bottom-(g.minHeight||j),c.x)}return m.intersect(l)},performResize:function(n,h){var p=this,a=p.getSplitter(),j=a.orientation,q=p.getPrevCmp(),o=p.getNextCmp(),b=a.ownerCt,l=b.query(">[flex]"),m=l.length,c=j==="vertical",k=0,g=c?"width":"height",d=0,r,s;for(;k<m;k++){r=l[k];s=c?r.getWidth():r.getHeight();d+=s;r.flex=s}h=c?h[0]:h[1];if(q){s=p.prevBox[g]+h;if(q.flex){q.flex=s}else{q[g]=s}}if(o){s=p.nextBox[g]-h;if(o.flex){o.flex=s}else{o[g]=s}}b.updateLayout()},endDrag:function(){var a=this;if(a.overlay){a.overlay.remove();delete a.overlay}a.callParent(arguments)},onEnd:function(c){var a=this,b=a.getSplitter();b.removeCls(b.baseCls+"-active");a.performResize(c,a.getResizeOffset())},onDrag:function(g){var c=this,h=c.getOffset("dragTarget"),d=c.getSplitter(),b=d.getEl(),a=d.orientation;if(a==="vertical"){b.setX(c.startRegion.left+h[0])}else{b.setY(c.startRegion.top+h[1])}},getSplitter:function(){return this.splitter},getVertPrevConstrainRight:function(a){return(a.prevCmp.maxWidth?a.prevBox.x+a.prevCmp.maxWidth:a.nextBox.right-(a.nextCmp.minWidth||a.defaultMin))+a.splitWidth},getVertPrevConstrainLeft:function(a){return a.prevBox.x+(a.prevCmp.minWidth||a.defaultMin)},getVertNextConstrainRight:function(a){return a.nextBox.right-(a.nextCmp.minWidth||a.defaultMin)},getVertNextConstrainLeft:function(a){return(a.nextCmp.maxWidth?a.nextBox.right-a.nextCmp.maxWidth:a.prevBox.x+(a.prevBox.minWidth||a.defaultMin))-a.splitWidth},getResizeOffset:function(){return this.getOffset("dragTarget")}});Ext.define("Ext.resizer.BorderSplitterTracker",{extend:Ext.resizer.SplitterTracker,getPrevCmp:null,getNextCmp:null,calculateConstrainRegion:function(){var y=this,a=y.splitter,o=a.collapseTarget,d=a.defaultSplitMin,h=a.vertical?"Width":"Height",c="min"+h,u="max"+h,j="get"+h,t=a.neighbors,e=t.length,n=o.el.getBox(),g=n.x,p=n.y,x=n.right,k=n.bottom,r=a.vertical?(x-g):(k-p),w,l,m,v,s,q,b;m=(o[c]||Math.min(r,d))-r;v=o[u];if(!v){v=1000000000}else{v-=r}b=r;for(w=0;w<e;++w){l=t[w];r=l[j]();s=r-l[u];q=r-(l[c]||Math.min(r,d));if(!isNaN(s)){if(m<s){m=s}}if(v>q){v=q}}if(v-m<2){return null}n=new Ext.util.Region(p,x,k,g);y.constraintAdjusters[y.getCollapseDirection()](n,m,v,a);y.dragInfo={minRange:m,maxRange:v,targetSize:b};return n},constraintAdjusters:{left:function(c,a,b,d){c[0]=c.x=c.left=c.right+a;c.right+=b+d.getWidth()},top:function(c,a,b,d){c[1]=c.y=c.top=c.bottom+a;c.bottom+=b+d.getHeight()},bottom:function(c,a,b,d){c.bottom=c.top-a;c.top-=b+d.getHeight()},right:function(c,a,b,d){c.right=c.left-a;c[0]=c.x=c.left=c.x-b+d.getWidth()}},onBeforeStart:function(h){var k=this,b=k.splitter,a=b.collapseTarget,m=b.neighbors,d=k.getSplitter().collapseEl,j=h.getTarget(),c=m.length,g,l;if(d&&j===b.collapseEl.dom){return false}if(a.collapsed){return false}for(g=0;g<c;++g){l=m[g];if(l.collapsed&&l.isHorz===a.isHorz){return false}}if(!(k.constrainTo=k.calculateConstrainRegion())){return false}return true},performResize:function(j,i){var k=this,b=k.splitter,h=b.collapseDirection,a=b.collapseTarget,g=k.splitAdjusters[b.vertical?"horz":"vert"],l=i[g.index],d=k.dragInfo,c;if(h=="right"||h=="bottom"){l=-l}l=Math.min(Math.max(d.minRange,l),d.maxRange);if(l){(c=b.ownerCt).suspendLayouts();g.adjustTarget(a,d.targetSize,l);c.resumeLayouts(true)}},splitAdjusters:{horz:{index:0,adjustTarget:function(b,a,c){b.flex=null;b.setSize(a+c)}},vert:{index:1,adjustTarget:function(b,a,c){b.flex=null;b.setSize(undefined,a+c)}}},getCollapseDirection:function(){return this.splitter.collapseDirection}});Ext.define("Ext.resizer.Handle",{extend:Ext.Component,handleCls:"",baseHandleCls:Ext.baseCSSPrefix+"resizable-handle",region:"",beforeRender:function(){var a=this;a.callParent();a.protoEl.unselectable();a.addCls(a.baseHandleCls,a.baseHandleCls+"-"+a.region,a.handleCls)}});Ext.define("Ext.resizer.ResizeTracker",{extend:Ext.dd.DragTracker,dynamic:true,preserveRatio:false,constrainTo:null,proxyCls:Ext.baseCSSPrefix+"resizable-proxy",constructor:function(b){var d=this,c,a,e;if(!b.el){if(b.target.isComponent){d.el=b.target.getEl()}else{d.el=b.target}}this.callParent(arguments);if(d.preserveRatio&&d.minWidth&&d.minHeight){c=d.minWidth/d.el.getWidth();a=d.minHeight/d.el.getHeight();if(a>c){d.minWidth=d.el.getWidth()*a}else{d.minHeight=d.el.getHeight()*c}}if(d.throttle){e=Ext.Function.createThrottled(function(){Ext.resizer.ResizeTracker.prototype.resize.apply(d,arguments)},d.throttle);d.resize=function(h,i,g){if(g){Ext.resizer.ResizeTracker.prototype.resize.apply(d,arguments)}else{e.apply(null,arguments)}}}},onBeforeStart:function(a){this.startBox=this.target.getBox()},getDynamicTarget:function(){var a=this,b=a.target;if(a.dynamic){return b}else{if(!a.proxy){a.proxy=a.createProxy(b)}}a.proxy.show();return a.proxy},createProxy:function(c){var b,a=this.proxyCls;if(c.isComponent){b=c.getProxy().addCls(a)}else{b=c.createProxy({tag:"div",cls:a,id:c.id+"-rzproxy"},Ext.getBody())}b.removeCls(Ext.baseCSSPrefix+"proxy-el");return b},onStart:function(a){this.activeResizeHandle=Ext.get(this.getDragTarget().id);if(!this.dynamic){this.resize(this.startBox,{horizontal:"none",vertical:"none"})}},onDrag:function(a){if(this.dynamic||this.proxy){this.updateDimensions(a)}},updateDimensions:function(s,m){var t=this,c=t.activeResizeHandle.region,g=t.getOffset(t.constrainTo?"dragTarget":null),k=t.startBox,h,p=0,u=0,j,q,a=0,w=0,v,n=g[0]<0?"right":"left",r=g[1]<0?"down":"up",i,b,d,o,l;c=t.convertRegionName(c);switch(c){case"south":u=g[1];b=2;break;case"north":u=-g[1];w=-u;b=2;break;case"east":p=g[0];b=1;break;case"west":p=-g[0];a=-p;b=1;break;case"northeast":u=-g[1];w=-u;p=g[0];i=[k.x,k.y+k.height];b=3;break;case"southeast":u=g[1];p=g[0];i=[k.x,k.y];b=3;break;case"southwest":p=-g[0];a=-p;u=g[1];i=[k.x+k.width,k.y];b=3;break;case"northwest":u=-g[1];w=-u;p=-g[0];a=-p;i=[k.x+k.width,k.y+k.height];b=3;break}d={width:k.width+p,height:k.height+u,x:k.x+a,y:k.y+w};j=Ext.Number.snap(d.width,t.widthIncrement);q=Ext.Number.snap(d.height,t.heightIncrement);if(j!=d.width||q!=d.height){switch(c){case"northeast":d.y-=q-d.height;break;case"north":d.y-=q-d.height;break;case"southwest":d.x-=j-d.width;break;case"west":d.x-=j-d.width;break;case"northwest":d.x-=j-d.width;d.y-=q-d.height}d.width=j;d.height=q}if(d.width<t.minWidth||d.width>t.maxWidth){d.width=Ext.Number.constrain(d.width,t.minWidth,t.maxWidth);if(a){d.x=k.x+(k.width-d.width)}}else{t.lastX=d.x}if(d.height<t.minHeight||d.height>t.maxHeight){d.height=Ext.Number.constrain(d.height,t.minHeight,t.maxHeight);if(w){d.y=k.y+(k.height-d.height)}}else{t.lastY=d.y}if(t.preserveRatio||s.shiftKey){h=t.startBox.width/t.startBox.height;o=Math.min(Math.max(t.minHeight,d.width/h),t.maxHeight);l=Math.min(Math.max(t.minWidth,d.height*h),t.maxWidth);if(b==1){d.height=o}else{if(b==2){d.width=l}else{v=Math.abs(i[0]-this.lastXY[0])/Math.abs(i[1]-this.lastXY[1]);if(v>h){d.height=o}else{d.width=l}if(c=="northeast"){d.y=k.y-(d.height-k.height)}else{if(c=="northwest"){d.y=k.y-(d.height-k.height);d.x=k.x-(d.width-k.width)}else{if(c=="southwest"){d.x=k.x-(d.width-k.width)}}}}}}if(u===0){r="none"}if(p===0){n="none"}t.resize(d,{horizontal:n,vertical:r},m)},getResizeTarget:function(a){return a?this.target:this.getDynamicTarget()},resize:function(c,e,a){var b=this,d=b.getResizeTarget(a);d.setBox(c);if(b.originalTarget&&(b.dynamic||a)){b.originalTarget.setBox(c)}},onEnd:function(a){this.updateDimensions(a,true);if(this.proxy){this.proxy.hide()}},convertRegionName:function(a){return a}});Ext.define("Ext.resizer.Resizer",{mixins:{observable:Ext.util.Observable},alternateClassName:"Ext.Resizable",handleCls:Ext.baseCSSPrefix+"resizable-handle",pinnedCls:Ext.baseCSSPrefix+"resizable-pinned",overCls:Ext.baseCSSPrefix+"resizable-over",wrapCls:Ext.baseCSSPrefix+"resizable-wrap",delimiterRe:/(?:\s*[,;]\s*)|\s+/,dynamic:true,handles:"s e se",height:null,width:null,heightIncrement:0,widthIncrement:0,minHeight:20,minWidth:20,maxHeight:10000,maxWidth:10000,pinned:false,preserveRatio:false,transparent:false,possiblePositions:{n:"north",s:"south",e:"east",w:"west",se:"southeast",sw:"southwest",nw:"northwest",ne:"northeast"},constructor:function(b){var m=this,j,q,s,r=m.handles,c,p,g,d=0,o,n=[],h,a,e,l,k=Ext.dom.Element.unselectableCls;m.addEvents("beforeresize","resizedrag","resize");if(Ext.isString(b)||Ext.isElement(b)||b.dom){j=b;b=arguments[1]||{};b.target=j}m.mixins.observable.constructor.call(m,b);j=m.target;if(j){if(j.isComponent){j.addClsWithUI("resizable");m.el=j.getEl();if(j.minWidth){m.minWidth=j.minWidth}if(j.minHeight){m.minHeight=j.minHeight}if(j.maxWidth){m.maxWidth=j.maxWidth}if(j.maxHeight){m.maxHeight=j.maxHeight}if(j.floating){if(!m.hasOwnProperty("handles")){m.handles="n ne e se s sw w nw"}}}else{m.el=m.target=Ext.get(j)}}else{m.target=m.el=Ext.get(m.el)}s=m.el.dom.tagName.toUpperCase();if(s=="TEXTAREA"||s=="IMG"||s=="TABLE"){m.originalTarget=m.target;q=m.el;e=q.getBox();m.target=m.el=m.el.wrap({cls:m.wrapCls,id:m.el.id+"-rzwrap",style:q.getStyles("margin-top","margin-bottom")});m.el.setPositioning(q.getPositioning());q.clearPositioning();m.el.setBox(e);q.setStyle("position","absolute")}m.el.position();if(m.pinned){m.el.addCls(m.pinnedCls)}m.resizeTracker=new Ext.resizer.ResizeTracker({disabled:m.disabled,target:m.target,constrainTo:m.constrainTo,overCls:m.overCls,throttle:m.throttle,originalTarget:m.originalTarget,delegate:"."+m.handleCls,dynamic:m.dynamic,preserveRatio:m.preserveRatio,heightIncrement:m.heightIncrement,widthIncrement:m.widthIncrement,minHeight:m.minHeight,maxHeight:m.maxHeight,minWidth:m.minWidth,maxWidth:m.maxWidth});m.resizeTracker.on({mousedown:m.onBeforeResize,drag:m.onResize,dragend:m.onResizeEnd,scope:m});if(m.handles=="all"){m.handles="n s e w ne nw se sw"}r=m.handles=m.handles.split(m.delimiterRe);p=m.possiblePositions;g=r.length;c=m.handleCls+" "+m.handleCls+"-{0}";if(m.target.isComponent){l=m.target.baseCls;c+=" "+l+"-handle "+l+"-handle-{0}";if(Ext.supports.CSS3BorderRadius){c+=" "+l+"-handle-{0}-br"}}h=Ext.isIE6?' style="height:'+m.el.getHeight()+'px"':"";for(;d<g;d++){if(r[d]&&p[r[d]]){o=p[r[d]];if(o==="east"||o==="west"){a=h}else{a=""}n.push('<div id="',m.el.id,"-",o,'-handle"',' class="',Ext.String.format(c,o)," ",k,'"',' unselectable="on"',a,"></div>")}}Ext.DomHelper.append(m.el,n.join(""));for(d=0;d<g;d++){if(r[d]&&p[r[d]]){o=p[r[d]];m[o]=m.el.getById(m.el.id+"-"+o+"-handle");m[o].region=o;if(m.transparent){m[o].setOpacity(0)}}}if(Ext.isNumber(m.width)){m.width=Ext.Number.constrain(m.width,m.minWidth,m.maxWidth)}if(Ext.isNumber(m.height)){m.height=Ext.Number.constrain(m.height,m.minHeight,m.maxHeight)}if(m.width!==null||m.height!==null){if(m.originalTarget){m.originalTarget.setWidth(m.width);m.originalTarget.setHeight(m.height)}m.resizeTo(m.width,m.height)}m.forceHandlesHeight()},disable:function(){this.resizeTracker.disable()},enable:function(){this.resizeTracker.enable()},onBeforeResize:function(b,c){var a=this.el.getBox();return this.fireEvent("beforeresize",this,a.width,a.height,c)},onResize:function(c,d){var b=this,a=b.el.getBox();b.forceHandlesHeight();return b.fireEvent("resizedrag",b,a.width,a.height,d)},onResizeEnd:function(c,d){var b=this,a=b.el.getBox();b.forceHandlesHeight();return b.fireEvent("resize",b,a.width,a.height,d)},resizeTo:function(b,a){var c=this;c.target.setSize(b,a);c.fireEvent("resize",c,b,a,null)},getEl:function(){return this.el},getTarget:function(){return this.target},destroy:function(){var e=this,d,c=e.handles,a=c.length,b=e.possiblePositions,g;e.resizeTracker.destroy();for(d=0;d<a;d++){if(g=e[b[c[d]]]){g.remove()}}},forceHandlesHeight:function(){var a=this,b;if(Ext.isIE6){b=a.east;if(b){b.setHeight(a.el.getHeight())}b=a.west;if(b){b.setHeight(a.el.getHeight())}a.el.repaint()}}});Ext.define("Ext.slider.Thumb",{topZIndex:10000,constructor:function(a){var b=this;Ext.apply(b,a||{},{cls:Ext.baseCSSPrefix+"slider-thumb",constrain:false});b.callParent([a])},render:function(){var a=this;a.el=a.slider.innerEl.insertFirst(a.getElConfig());a.onRender()},onRender:function(){if(this.disabled){this.disable()}this.initEvents()},getElConfig:function(){var c=this,b=c.slider,a={};a[b.vertical?"bottom":b.horizontalProp]=b.calculateThumbPosition(b.normalizeValue(c.value))+"%";return{style:a,id:this.id,cls:this.cls}},move:function(c,b){var g=this,d=g.el,e=g.slider,a=e.vertical?"bottom":e.horizontalProp,i,h;c+="%";if(!b){d.dom.style[a]=c}else{i={};i[a]=c;if(!Ext.supports.GetPositionPercentage){h={};h[a]=d.dom.style[a]}new Ext.fx.Anim({target:d,duration:350,from:h,to:i})}},bringToFront:function(){this.el.setStyle("zIndex",this.topZIndex)},sendToBack:function(){this.el.setStyle("zIndex","")},enable:function(){var a=this;a.disabled=false;if(a.el){a.el.removeCls(a.slider.disabledCls)}},disable:function(){var a=this;a.disabled=true;if(a.el){a.el.addCls(a.slider.disabledCls)}},initEvents:function(){var b=this,a=b.el;b.tracker=new Ext.dd.DragTracker({onBeforeStart:Ext.Function.bind(b.onBeforeDragStart,b),onStart:Ext.Function.bind(b.onDragStart,b),onDrag:Ext.Function.bind(b.onDrag,b),onEnd:Ext.Function.bind(b.onDragEnd,b),tolerance:3,autoStart:300,overCls:Ext.baseCSSPrefix+"slider-thumb-over"});b.tracker.initEl(a)},onBeforeDragStart:function(a){if(this.disabled){return false}else{this.slider.promoteThumb(this);return true}},onDragStart:function(c){var b=this,a=b.slider;a.onDragStart(b,c);b.el.addCls(Ext.baseCSSPrefix+"slider-thumb-drag");b.dragging=b.slider.dragging=true;b.dragStartValue=b.value;a.fireEvent("dragstart",a,c,b)},onDrag:function(h){var d=this,c=d.slider,b=d.index,g=d.getValueFromTracker(),a,i;if(g!==undefined){if(d.constrain){a=c.thumbs[b+1];i=c.thumbs[b-1];if(i!==undefined&&g<=i.value){g=i.value}if(a!==undefined&&g>=a.value){g=a.value}}c.setValue(b,g,false);c.fireEvent("drag",c,h,d)}},getValueFromTracker:function(){var a=this.slider,b=a.getTrackpoint(this.tracker.getXY());if(b!==undefined){return a.reversePixelValue(b)}},onDragEnd:function(d){var b=this,a=b.slider,c=b.value;a.onDragEnd(b,d);b.el.removeCls(Ext.baseCSSPrefix+"slider-thumb-drag");b.dragging=a.dragging=false;a.fireEvent("dragend",a,d);if(b.dragStartValue!=c){a.fireEvent("changecomplete",a,c,b)}},destroy:function(){Ext.destroy(this.tracker)}});Ext.define("Ext.slider.Tip",{extend:Ext.tip.Tip,minWidth:10,alias:"widget.slidertip",offsets:null,align:null,position:"",defaultVerticalPosition:"left",defaultHorizontalPosition:"top",isSliderTip:true,init:function(c){var b=this,d,a;if(!b.position){b.position=c.vertical?b.defaultVerticalPosition:b.defaultHorizontalPosition}switch(b.position){case"top":a=[0,-10];d="b-t?";break;case"bottom":a=[0,10];d="t-b?";break;case"left":a=[-10,0];d="r-l?";break;case"right":a=[10,0];d="l-r?"}if(!b.align){b.align=d}if(!b.offsets){b.offsets=a}c.on({scope:b,dragstart:b.onSlide,drag:b.onSlide,dragend:b.hide,destroy:b.destroy})},onSlide:function(c,d,a){var b=this;b.show();b.update(b.getText(a));b.el.alignTo(a.el,b.align,b.offsets)},getText:function(a){return String(a.value)}});Ext.define("Ext.slider.Multi",{extend:Ext.form.field.Base,alias:"widget.multislider",alternateClassName:"Ext.slider.MultiSlider",childEls:["endEl","innerEl"],fieldSubTpl:['<div id="{id}" class="'+Ext.baseCSSPrefix+"slider {fieldCls} {vertical}","{childElCls}",'" aria-valuemin="{minValue}" aria-valuemax="{maxValue}" aria-valuenow="{value}" aria-valuetext="{value}">','<div id="{cmpId}-endEl" class="'+Ext.baseCSSPrefix+'slider-end" role="presentation">','<div id="{cmpId}-innerEl" class="'+Ext.baseCSSPrefix+'slider-inner" role="presentation">',"{%this.renderThumbs(out, values)%}","</div>","</div>","</div>",{renderThumbs:function(g,e){var j=e.$comp,h=0,c=j.thumbs,b=c.length,d,a;for(;h<b;h++){d=c[h];a=d.getElConfig();a.id=j.id+"-thumb-"+h;Ext.DomHelper.generateMarkup(a,g)}},disableFormats:true}],horizontalProp:"left",vertical:false,minValue:0,maxValue:100,decimalPrecision:0,keyIncrement:1,increment:0,clickRange:[5,15],clickToChange:true,animate:true,dragging:false,constrainThumbs:true,componentLayout:"sliderfield",useTips:true,tipText:null,ariaRole:"slider",initValue:function(){var e=this,c=Ext.value,b=c(e.values,[c(e.value,c(e.minValue,0))]),d=0,a=b.length;e.originalValue=b;for(;d<a;d++){e.addThumb(b[d])}},initComponent:function(){var e=this,c,d,g,b,a;e.thumbs=[];e.keyIncrement=Math.max(e.increment,e.keyIncrement);e.addEvents("beforechange","change","changecomplete","dragstart","drag","dragend");if(e.increment){e.maxValue=Ext.Number.snapInRange(e.maxValue,e.increment,e.minValue);e.value=e.normalizeValue(e.value)}e.callParent();if(e.useTips){if(Ext.isObject(e.useTips)){c=Ext.apply({},e.useTips)}else{c=e.tipText?{getText:e.tipText}:{}}a=e.plugins=e.plugins||[];b=a.length;for(g=0;g<b;g++){if(a[g].isSliderTip){d=true;break}}if(!d){e.plugins.push(new Ext.slider.Tip(c))}}},addThumb:function(c){var b=this,a=new Ext.slider.Thumb({ownerCt:b,ownerLayout:b.getComponentLayout(),value:c,slider:b,index:b.thumbs.length,constrain:b.constrainThumbs,disabled:!!b.readOnly});b.thumbs.push(a);if(b.rendered){a.render()}return a},promoteThumb:function(c){var a=this.thumbs,e=a.length,g,b,d;for(d=0;d<e;d++){b=a[d];if(b==c){b.bringToFront()}else{b.sendToBack()}}},getSubTplData:function(){var a=this;return Ext.apply(a.callParent(),{$comp:a,vertical:a.vertical?Ext.baseCSSPrefix+"slider-vert":Ext.baseCSSPrefix+"slider-horz",minValue:a.minValue,maxValue:a.maxValue,value:a.value,childElCls:""})},onRender:function(){var e=this,b=e.thumbs,a=b.length,d=0,c;e.callParent(arguments);for(d=0;d<a;d++){c=b[d];c.el=e.el.getById(e.id+"-thumb-"+d);c.onRender()}},initEvents:function(){var a=this;a.mon(a.el,{scope:a,mousedown:a.onMouseDown,keydown:a.onKeyDown})},onDragStart:Ext.emptyFn,onDragEnd:Ext.emptyFn,getTrackpoint:function(h){var g=this,d=g.vertical,c=g.innerEl,b,a,e;if(d){e="top";b=c.getHeight()}else{e=g.horizontalProp;b=c.getWidth()}h=g.transformTrackPoints(c.translatePoints(h));a=Ext.Number.constrain(h[e],0,b);return d?b-a:a},transformTrackPoints:Ext.identityFn,onMouseDown:function(j){var d=this,h=false,c=0,b=d.thumbs,a=b.length,g;if(d.disabled){return}for(;c<a;c++){h=h||j.target==b[c].el.dom}if(d.clickToChange&&!h){g=d.getTrackpoint(j.getXY());if(g!==undefined){d.onClickChange(g)}}d.focus()},onClickChange:function(d){var c=this,a,b;a=c.getNearest(d);if(!a.disabled){b=a.index;c.setValue(b,Ext.util.Format.round(c.reversePixelValue(d),c.decimalPrecision),undefined,true)}},getNearest:function(j){var k=this,g=k.reversePixelValue(j),l=k.getRange()+5,b=null,e=k.thumbs,c=0,d=e.length,a,m,h;for(;c<d;c++){a=k.thumbs[c];m=a.value;h=Math.abs(m-g);if(Math.abs(h<=l)){b=a;l=h}}return b},onKeyDown:function(c){var b=this,a,d;if(b.disabled||b.thumbs.length!==1){c.preventDefault();return}a=c.getKey();switch(a){case c.UP:case c.RIGHT:c.stopEvent();d=c.ctrlKey?b.maxValue:b.getValue(0)+b.keyIncrement;b.setValue(0,d,undefined,true);break;case c.DOWN:case c.LEFT:c.stopEvent();d=c.ctrlKey?b.minValue:b.getValue(0)-b.keyIncrement;b.setValue(0,d,undefined,true);break;default:c.preventDefault()}},normalizeValue:function(b){var c=this,d=Ext.Number,a=d[c.zeroBasedSnapping?"snap":"snapInRange"];b=a.call(d,b,c.increment,c.minValue,c.maxValue);b=Ext.util.Format.round(b,c.decimalPrecision);b=Ext.Number.constrain(b,c.minValue,c.maxValue);return b},setMinValue:function(g){var e=this,d=0,b=e.thumbs,a=b.length,c;e.minValue=g;if(e.rendered){e.inputEl.dom.setAttribute("aria-valuemin",g)}for(;d<a;++d){c=b[d];c.value=c.value<g?g:c.value}e.syncThumbs()},setMaxValue:function(g){var e=this,d=0,b=e.thumbs,a=b.length,c;e.maxValue=g;if(e.rendered){e.inputEl.dom.setAttribute("aria-valuemax",g)}for(;d<a;++d){c=b[d];c.value=c.value>g?g:c.value}e.syncThumbs()},setValue:function(e,k,b,d){var j=this,h=j.thumbs,a,g,c,l;if(Ext.isArray(e)){l=e;b=k;for(c=0,g=l.length;c<g;++c){a=h[c];if(a){j.setValue(c,l[c],b)}}return j}a=j.thumbs[e];k=j.normalizeValue(k);if(k!==a.value&&j.fireEvent("beforechange",j,k,a.value,a)!==false){a.value=k;if(j.rendered){j.inputEl.set({"aria-valuenow":k,"aria-valuetext":k});a.move(j.calculateThumbPosition(k),Ext.isDefined(b)?b!==false:j.animate);j.fireEvent("change",j,k,a);j.checkDirty();if(d){j.fireEvent("changecomplete",j,k,a)}}}return j},calculateThumbPosition:function(a){var b=this,c=b.minValue,d=(a-c)/b.getRange()*100;if(isNaN(d)){d=c}return d},getRatio:function(){var b=this,d=b.innerEl,a=b.vertical?d.getHeight():d.getWidth(),c=b.getRange();return c===0?a:(a/c)},getRange:function(){return this.maxValue-this.minValue},reversePixelValue:function(a){return this.minValue+(a/this.getRatio())},reversePercentageValue:function(a){return this.minValue+this.getRange()*(a/100)},onDisable:function(){var g=this,d=0,b=g.thumbs,a=b.length,c,e,h;g.callParent();for(;d<a;d++){c=b[d];e=c.el;c.disable();if(Ext.isIE){h=e.getXY();e.hide();g.innerEl.addCls(g.disabledCls).dom.disabled=true;if(!g.thumbHolder){g.thumbHolder=g.endEl.createChild({cls:Ext.baseCSSPrefix+"slider-thumb "+g.disabledCls})}g.thumbHolder.show().setXY(h)}}},onEnable:function(){var g=this,d=0,b=g.thumbs,a=b.length,c,e;this.callParent();for(;d<a;d++){c=b[d];e=c.el;c.enable();if(Ext.isIE){g.innerEl.removeCls(g.disabledCls).dom.disabled=false;if(g.thumbHolder){g.thumbHolder.hide()}e.show();g.syncThumbs()}}},syncThumbs:function(){if(this.rendered){var a=this.thumbs,c=a.length,b=0;for(;b<c;b++){a[b].move(this.calculateThumbPosition(a[b].value))}}},getValue:function(a){return Ext.isNumber(a)?this.thumbs[a].value:this.getValues()},getValues:function(){var c=[],d=0,b=this.thumbs,a=b.length;for(;d<a;d++){c.push(b[d].value)}return c},getSubmitValue:function(){var a=this;return(a.disabled||!a.submitValue)?null:a.getValue()},reset:function(){var e=this,b=[].concat(e.originalValue),c=0,d=b.length,g;for(;c<d;c++){g=b[c];e.setValue(c,g)}e.clearInvalid();delete e.wasValid},setReadOnly:function(e){var d=this,b=d.thumbs,a=b.length,c=0;d.callParent(arguments);e=d.readOnly;for(;c<a;++c){if(e){b[c].disable()}else{b[c].enable()}}},beforeDestroy:function(){var e=this,b=e.thumbs,d=0,a=b.length,c;Ext.destroy(e.innerEl,e.endEl,e.focusEl);for(;d<a;d++){c=b[d];Ext.destroy(c)}e.callParent()}});Ext.define("Ext.tab.Tab",{extend:Ext.button.Button,alias:"widget.tab",isTab:true,baseCls:Ext.baseCSSPrefix+"tab",activeCls:"active",closableCls:"closable",closable:true,closeText:"Close Tab",active:false,childEls:["closeEl"],scale:false,position:"top",initComponent:function(){var a=this;a.addEvents("activate","deactivate","beforeclose","close");a.callParent(arguments);if(a.card){a.setCard(a.card)}a.overCls=["over",a.position+"-over"]},getTemplateArgs:function(){var b=this,a=b.callParent();a.closable=b.closable;a.closeText=b.closeText;return a},beforeRender:function(){var b=this,a=b.up("tabbar"),c=b.up("tabpanel");b.callParent();b.addClsWithUI(b.position);if(b.active){b.addClsWithUI([b.activeCls,b.position+"-"+b.activeCls])}b.syncClosableUI();if(!b.minWidth){b.minWidth=(a)?a.minTabWidth:b.minWidth;if(!b.minWidth&&c){b.minWidth=c.minTabWidth}if(b.minWidth&&b.iconCls){b.minWidth+=25}}if(!b.maxWidth){b.maxWidth=(a)?a.maxTabWidth:b.maxWidth;if(!b.maxWidth&&c){b.maxWidth=c.maxTabWidth}}},onRender:function(){var a=this;a.setElOrientation();a.callParent(arguments);a.keyNav=new Ext.util.KeyNav(a.el,{enter:a.onEnterKey,del:a.onDeleteKey,scope:a})},setElOrientation:function(){var a=this.position;if(a==="left"||a==="right"){this.el.setVertical(a==="right"?90:270)}},enable:function(a){var b=this;b.callParent(arguments);b.removeClsWithUI(b.position+"-disabled");return b},disable:function(a){var b=this;b.callParent(arguments);b.addClsWithUI(b.position+"-disabled");return b},onDestroy:function(){var a=this;Ext.destroy(a.keyNav);delete a.keyNav;a.callParent(arguments)},setClosable:function(a){var b=this;a=(!arguments.length||!!a);if(b.closable!=a){b.closable=a;if(b.card){b.card.closable=a}b.syncClosableUI();if(b.rendered){b.syncClosableElements();b.updateLayout()}}},syncClosableElements:function(){var a=this,b=a.closeEl;if(a.closable){if(!b){a.closeEl=a.btnWrap.insertSibling({tag:"a",cls:a.baseCls+"-close-btn",href:"#",title:a.closeText},"after")}}else{if(b){b.remove();delete a.closeEl}}},syncClosableUI:function(){var b=this,a=[b.closableCls,b.closableCls+"-"+b.position];if(b.closable){b.addClsWithUI(a)}else{b.removeClsWithUI(a)}},setCard:function(a){var b=this;b.card=a;b.setText(b.title||a.title);b.setIconCls(b.iconCls||a.iconCls);b.setIcon(b.icon||a.icon);b.setGlyph(b.glyph||a.glyph)},onCloseClick:function(){var a=this;if(a.fireEvent("beforeclose",a)!==false){if(a.tabBar){if(a.tabBar.closeTab(a)===false){return}}else{a.fireClose()}}},fireClose:function(){this.fireEvent("close",this)},onEnterKey:function(b){var a=this;if(a.tabBar){a.tabBar.onClick(b,a.el)}},onDeleteKey:function(a){if(this.closable){this.onCloseClick()}},activate:function(b){var a=this;a.active=true;a.addClsWithUI([a.activeCls,a.position+"-"+a.activeCls]);if(b!==true){a.fireEvent("activate",a)}},deactivate:function(b){var a=this;a.active=false;a.removeClsWithUI([a.activeCls,a.position+"-"+a.activeCls]);if(b!==true){a.fireEvent("deactivate",a)}}});Ext.define("Ext.util.Point",{extend:Ext.util.Region,statics:{fromEvent:function(a){a=a.browserEvent||a;a=(a.changedTouches&&a.changedTouches.length>0)?a.changedTouches[0]:a;return new this(a.pageX,a.pageY)}},constructor:function(a,b){this.callParent([b,a,b,a])},toString:function(){return"Point["+this.x+","+this.y+"]"},equals:function(a){return(this.x==a.x&&this.y==a.y)},isWithin:function(b,a){if(!Ext.isObject(a)){a={x:a,y:a}}return(this.x<=b.x+a.x&&this.x>=b.x-a.x&&this.y<=b.y+a.y&&this.y>=b.y-a.y)},isContainedBy:function(a){if(!(a instanceof Ext.util.Region)){a=Ext.get(a.el||a).getRegion()}return a.contains(this)},roundedEquals:function(a){return(Math.round(this.x)==Math.round(a.x)&&Math.round(this.y)==Math.round(a.y))}},function(){this.prototype.translate=Ext.util.Region.prototype.translateBy});Ext.define("Ext.tab.Bar",{extend:Ext.panel.Header,alias:"widget.tabbar",baseCls:Ext.baseCSSPrefix+"tab-bar",isTabBar:true,defaultType:"tab",plain:false,childEls:["body","strip"],renderTpl:['<div id="{id}-body" class="{baseCls}-body {bodyCls} {bodyTargetCls}<tpl if="ui"> {baseCls}-body-{ui}<tpl for="uiCls"> {parent.baseCls}-body-{parent.ui}-{.}</tpl></tpl>"<tpl if="bodyStyle"> style="{bodyStyle}"</tpl>>',"{%this.renderContainer(out,values)%}","</div>",'<div id="{id}-strip" class="{baseCls}-strip {baseCls}-strip-{dock}','<tpl if="ui"> {baseCls}-strip-{ui}','<tpl for="uiCls"> {parent.baseCls}-strip-{parent.ui}-{.}</tpl>','</tpl>">',"</div>"],_reverseDockNames:{left:"right",right:"left"},initComponent:function(){var a=this;if(a.plain){a.addCls(a.baseCls+"-plain")}a.addClsWithUI(a.orientation);a.addEvents("change");a.callParent(arguments);Ext.merge(a.layout,a.initialConfig.layout);a.layout.align=(a.orientation=="vertical")?"left":"top";a.layout.overflowHandler=new Ext.layout.container.boxOverflow.Scroller(a.layout);a.remove(a.titleCmp);delete a.titleCmp;Ext.apply(a.renderData,{bodyCls:a.bodyCls,dock:a.dock})},onRender:function(){var a=this;a.callParent();if(a.orientation==="vertical"&&(Ext.isIE8||Ext.isIE9)&&Ext.isStrict){a.el.on({mousemove:a.onMouseMove,scope:a})}},afterRender:function(){var a=this.layout;this.callParent();if(Ext.isIE9&&Ext.isStrict&&this.orientation==="vertical"){a.innerCt.on("scroll",function(){a.innerCt.dom.scrollLeft=0})}},afterLayout:function(){this.adjustTabPositions();this.callParent(arguments)},adjustTabPositions:function(){var a=this.items.items,b=a.length,c;if(!Ext.isIE9m){if(this.dock==="right"){while(b--){c=a[b];c.el.setStyle("left",c.lastBox.width+"px")}}else{if(this.dock==="left"){while(b--){c=a[b];c.el.setStyle("left",-c.lastBox.height+"px")}}}}},getLayout:function(){var a=this;a.layout.type=(a.orientation==="horizontal")?"hbox":"vbox";return a.callParent(arguments)},onAdd:function(a){a.position=this.dock;this.callParent(arguments)},onRemove:function(a){var b=this;if(a===b.previousTab){b.previousTab=null}b.callParent(arguments)},afterComponentLayout:function(b){var c=this,a=c.needsScroll;c.callParent(arguments);if(a){c.layout.overflowHandler.scrollToItem(c.activeTab)}delete c.needsScroll},onClick:function(h,g){var d=this,j=d.tabPanel,i,c,b,a;if(h.getTarget("."+Ext.baseCSSPrefix+"box-scroller")){return}if(d.orientation==="vertical"&&(Ext.isIE8||Ext.isIE9)&&Ext.isStrict){a=d.getTabInfoFromPoint(h.getXY());c=a.tab;b=a.close}else{i=h.getTarget("."+Ext.tab.Tab.prototype.baseCls);c=i&&Ext.getCmp(i.id);b=c&&c.closeEl&&(g===c.closeEl.dom)}if(b){h.preventDefault()}if(c&&c.isDisabled&&!c.isDisabled()){if(c.closable&&b){c.onCloseClick()}else{if(j){j.setActiveTab(c.card)}else{d.setActiveTab(c)}c.focus()}}},onMouseMove:function(g){var d=this,b=d._overTab,a,c;if(g.getTarget("."+Ext.baseCSSPrefix+"box-scroller")){return}a=d.getTabInfoFromPoint(g.getXY());c=a.tab;if(c!==b){if(b&&b.rendered){b.onMouseLeave(g);d._overTab=null}if(c){c.onMouseEnter(g);d._overTab=c;if(!c.disabled){d.el.setStyle("cursor","pointer")}}else{d.el.setStyle("cursor","default")}}},onMouseLeave:function(b){var a=this._overTab;if(a&&a.rendered){a.onMouseLeave(b)}},getTabInfoFromPoint:function(g){var A=this,w=A.items.items,e=w.length,o=A.layout.innerCt,u=o.getXY(),t=new Ext.util.Point(g[0],g[1]),v=0,x,b,a,p,y,j,h,d,r,l,k,n,m,s,q,z,c;for(;v<e;v++){x=w[v].lastBox;l=u[0]+x.x;k=u[1]-o.dom.scrollTop+x.y;n=x.width;m=x.height;b=new Ext.util.Region(k,l+n,k+m,l);if(b.contains(t)){c=w[v];a=c.closeEl;if(a){y=a.getXY();d=a.getWidth();r=a.getHeight();if(A._isTabReversed===undefined){A._isTabReversed=q=(c.btnWrap.dom.currentStyle.filter.indexOf("rotation=2")!==-1)}z=q?this._reverseDockNames[A.dock]:A.dock;if(z==="right"){j=l+n-((y[1]-k)+a.getHeight());h=k+(y[0]-l)}else{j=l+(y[1]-k);h=k+l+m-y[0]-a.getWidth()}s=new Ext.util.Region(h,j+d,h+r,j);p=s.contains(t)}break}}return{tab:c,close:p}},closeTab:function(c){var d=this,b=c.card,e=d.tabPanel,a;if(b&&b.fireEvent("beforeclose",b)===false){return false}a=d.findNextActivatable(c);Ext.suspendLayouts();if(e&&b){delete c.ownerCt;b.fireEvent("close",b);e.remove(b);if(!e.getComponent(b)){c.fireClose();d.remove(c)}else{c.ownerCt=d;Ext.resumeLayouts(true);return false}}if(a){if(e){e.setActiveTab(a.card)}else{d.setActiveTab(a)}a.focus()}Ext.resumeLayouts(true)},findNextActivatable:function(a){var b=this;if(a.active&&b.items.getCount()>1){return(b.previousTab&&b.previousTab!==a&&!b.previousTab.disabled)?b.previousTab:(a.next("tab[disabled=false]")||a.prev("tab[disabled=false]"))}},setActiveTab:function(b,a){var c=this;if(!b.disabled&&b!==c.activeTab){if(c.activeTab){if(c.activeTab.isDestroyed){c.previousTab=null}else{c.previousTab=c.activeTab;c.activeTab.deactivate()}}b.activate();c.activeTab=b;c.needsScroll=true;if(!a){c.fireEvent("change",c,b,b.card);c.updateLayout()}}}});Ext.define("Ext.tree.Column",{extend:Ext.grid.column.Column,alias:"widget.treecolumn",tdCls:Ext.baseCSSPrefix+"grid-cell-treecolumn",autoLock:true,lockable:false,draggable:false,hideable:false,treePrefix:Ext.baseCSSPrefix+"tree-",elbowPrefix:Ext.baseCSSPrefix+"tree-elbow-",expanderCls:Ext.baseCSSPrefix+"tree-expander",imgText:'<img src="{1}" class="{0}" />',checkboxText:'<input type="button" role="checkbox" class="{0}" {1} />',initComponent:function(){var a=this;a.origRenderer=a.renderer||a.defaultRenderer;a.origScope=a.scope||window;a.renderer=a.treeRenderer;a.scope=a;a.callParent()},treeRenderer:function(m,o,c,b,l,e,k){var t=this,s=[],q=Ext.String.format,v=c.getDepth(),r=t.treePrefix,d=t.elbowPrefix,n=t.expanderCls,i=t.imgText,w=t.checkboxText,h=t.origRenderer.apply(t.origScope,arguments),g=Ext.BLANK_IMAGE_URL,p=c.get("href"),u=c.get("hrefTarget"),a=c.get("cls"),j=t.getChildCls?t.getChildCls()+" ":"";while(c){if(!c.isRoot()||(c.isRoot()&&k.rootVisible)){if(c.getDepth()===v){s.unshift(q(i,j+r+"icon "+r+"icon"+(c.get("icon")?"-inline ":(c.isLeaf()?"-leaf ":"-parent "))+(c.get("iconCls")||""),c.get("icon")||g));if(c.get("checked")!==null){s.unshift(q(w,j+(r+"checkbox")+(c.get("checked")?" "+r+"checkbox-checked":""),c.get("checked")?'aria-checked="true"':""));if(c.get("checked")){o.tdCls+=(" "+r+"checked")}}if(c.isLast()){if(c.isExpandable()){s.unshift(q(i,(j+d+"end-plus "+n),g))}else{s.unshift(q(i,(j+d+"end"),g))}}else{if(c.isExpandable()){s.unshift(q(i,(j+d+"plus "+n),g))}else{s.unshift(q(i,(j+r+"elbow"),g))}}}else{if(c.isLast()||c.getDepth()===0){s.unshift(q(i,(j+d+"empty"),g))}else{if(c.getDepth()!==0){s.unshift(q(i,(j+d+"line"),g))}}}}c=c.parentNode}if(p){s.push('<a class="'+Ext.baseCSSPrefix+'tree-node-text" href="',p,'" target="',u,'">')}else{s.push('<span class="'+Ext.baseCSSPrefix+'tree-node-text">')}s.push(h);if(p){s.push("</a>")}else{s.push("</span>")}if(a){o.tdCls+=" "+a}return s.join("")},defaultRenderer:Ext.identityFn});Ext.define("Ext.selection.CellModel",{extend:Ext.selection.Model,alias:"selection.cellmodel",isCellModel:true,enableKeyNav:true,preventWrap:false,noSelection:{row:-1,column:-1},constructor:function(){this.addEvents("deselect","select");this.callParent(arguments)},bindComponent:function(a){var c=this,b=a.ownerCt;c.primaryView=a;c.views=c.views||[];c.views.push(a);c.bindStore(a.getStore(),true);a.on({cellmousedown:c.onMouseDown,refresh:c.onViewRefresh,scope:c});if(b.optimizedColumnMove!==false){b.on("columnmove",c.onColumnMove,c)}if(c.enableKeyNav){c.initKeyNav(a)}},initKeyNav:function(a){var b=this;if(!a.rendered){a.on("render",Ext.Function.bind(b.initKeyNav,b,[a],0),b,{single:true});return}a.el.set({tabIndex:-1});b.keyNav=new Ext.util.KeyNav({target:a.el,ignoreInputFields:true,up:b.onKeyUp,down:b.onKeyDown,right:b.onKeyRight,left:b.onKeyLeft,tab:b.onKeyTab,scope:b})},getHeaderCt:function(){var b=this.getCurrentPosition(),a=b?b.view:this.primaryView;return a.headerCt},onKeyUp:function(b,a){this.doMove("up",b)},onKeyDown:function(b,a){this.doMove("down",b)},onKeyLeft:function(b,a){this.doMove("left",b)},onKeyRight:function(b,a){this.doMove("right",b)},doMove:function(b,a){this.keyNavigation=true;this.move(b,a);this.keyNavigation=false},move:function(a,d){var c=this,g=c.getCurrentPosition(),b;if(g){b=g.view.walkCells(g,a,d,c.preventWrap);if(b){b.view=g.view;return c.setCurrentPosition(b)}}},getCurrentPosition:function(){return this.selecting?this.nextSelection:this.selection},setCurrentPosition:function(c){var b=this,a=b.selection;b.lastSelection=a;if(a){if(c&&(c.row===a.row&&c.column===a.column&&c.view===a.view)){c=null}else{b.onCellDeselect(b.selection)}}if(c){b.nextSelection=new b.Selection(b);b.nextSelection.setPosition(c);b.selecting=true;b.onCellSelect(b.nextSelection);b.selecting=false;return(b.selection=b.nextSelection)}},isCellSelected:function(a,e,c){var d=this,b,g=d.getCurrentPosition();if(g&&g.view===a){b=new this.Selection(d);b.setPosition({view:a,row:e,column:c});return(b.record===g.record)&&(b.columnHeader===g.columnHeader)}},onStoreRemove:function(k,b,e){var h=this,j=h.getCurrentPosition(),c,a=b.length,g,d=0;h.callParent(arguments);if(j){if(e[0]>j.row){return}for(c=0;c<a;c++){g=e[c];if(g<j.row){d++}else{break}}if(d){j.setRow(j.row-d)}}},onMouseDown:function(c,a,g,b,i,d,h){if(d!==-1){this.setCurrentPosition({view:c,row:i,column:g})}},onCellSelect:function(a,b){if(a&&a.row!==undefined&&a.row>-1){this.doSelect(a.record,false,b)}},onCellDeselect:function(a,b){if(a&&a.row!==undefined){this.doDeselect(a.record,b)}},onSelectChange:function(b,e,d,h){var g=this,i,c,a;if(e){i=g.nextSelection;c="select"}else{i=g.lastSelection||g.noSelection;c="deselect"}a=i.view||g.primaryView;if((d||g.fireEvent("before"+c,g,b,i.row,i.column))!==false&&h()!==false){if(e){a.onCellSelect(i);a.onCellFocus(i)}else{a.onCellDeselect(i);delete g.selection}if(!d){g.fireEvent(c,g,b,i.row,i.column)}}},onKeyTab:function(d,b){var c=this,g=c.getCurrentPosition(),a;if(g){a=g.view.editingPlugin;if(a&&c.wasEditing){c.onEditorTab(a,d)}else{c.move(d.shiftKey?"left":"right",d)}}},onEditorTab:function(b,g){var c=this,d=g.shiftKey?"left":"right",a=c.move(d,g);if(a){if(b.startEdit(a.row,a.column)){c.wasEditing=false}else{c.wasEditing=true;if(!a.columnHeader.dataIndex){c.onEditorTab(b,g)}}}},refresh:function(){var b=this.getCurrentPosition(),a;if(b&&(a=this.store.indexOf(this.selected.last()))!==-1){b.row=a}},onColumnMove:function(d,e,b,c){var a=d.up("tablepanel");if(a){this.onViewRefresh(a.view)}},onUpdate:function(a){var b=this,c;if(b.isSelected(a)){c=b.selecting?b.nextSelection:b.selection;b.view.onCellSelect(c)}},onViewRefresh:function(b){var c=this,g=c.getCurrentPosition(),e=b.headerCt,a,d;if(g&&g.view===b){a=g.record;d=g.columnHeader;if(!d.isDescendantOf(e)){d=e.queryById(d.id)||e.down('[text="'+d.text+'"]')||e.down('[dataIndex="'+d.dataIndex+'"]')}if(d&&(b.store.indexOfId(a.getId())!==-1)){c.setCurrentPosition({row:a,column:d,view:b})}}},selectByPosition:function(a){this.setCurrentPosition(a)}},function(){var a=this.prototype.Selection=function(b){this.model=b;this.view=b.primaryView};a.prototype.setPosition=function(d,b){var c=this;if(arguments.length===1){if(d.view){c.view=d.view}b=d.column;d=d.row}c.setRow(d);c.setColumn(b);return c};a.prototype.setRow=function(c){var b=this;if(c!==undefined){if(typeof c==="number"){b.row=Math.max(Math.min(c,b.view.store.getCount()-1),0);b.record=b.view.store.getAt(c)}else{if(c.isModel){b.record=c;b.row=b.view.indexOf(c)}else{if(c.tagName){b.record=b.view.getRecord(c);b.row=b.view.indexOf(b.record)}}}}};a.prototype.setColumn=function(b){var c=this;if(b!==undefined){if(typeof b==="number"){c.column=b;c.columnHeader=c.view.getHeaderAtIndex(b)}else{if(b.isHeader){c.columnHeader=b;c.column=b.getIndex()}}}}});Ext.define("Ext.selection.RowModel",{extend:Ext.selection.Model,alias:"selection.rowmodel",deltaScroll:5,enableKeyNav:true,ignoreRightMouseSelection:false,constructor:function(){this.addEvents("beforedeselect","beforeselect","deselect","select");this.views=[];this.callParent(arguments)},bindComponent:function(a){var b=this;b.views=b.views||[];b.views.push(a);b.bindStore(a.getStore(),true);a.on({itemmousedown:b.onRowMouseDown,itemclick:b.onRowClick,scope:b});if(b.enableKeyNav){b.initKeyNav(a)}},initKeyNav:function(a){var b=this;if(!a.rendered){a.on("render",Ext.Function.bind(b.initKeyNav,b,[a],0),b,{single:true});return}a.el.set({tabIndex:-1});b.keyNav=new Ext.util.KeyNav({target:a,ignoreInputFields:true,eventName:"itemkeydown",processEvent:function(d,c,h,e,g){g.record=c;g.recordIndex=e;return g},up:b.onKeyUp,down:b.onKeyDown,right:b.onKeyRight,left:b.onKeyLeft,pageDown:b.onKeyPageDown,pageUp:b.onKeyPageUp,home:b.onKeyHome,end:b.onKeyEnd,space:b.onKeySpace,enter:b.onKeyEnter,scope:b})},onUpdate:function(b){var d=this,a=d.view,c;if(a&&d.isSelected(b)){c=a.indexOf(b);a.onRowSelect(c);if(b===d.lastFocused){a.onRowFocus(c,true)}}},getRowsVisible:function(){var e=false,a=this.views[0],d=a.all.first(),b,c;if(d){b=d.getHeight();c=a.el.getHeight();e=Math.floor(c/b)}return e},onKeyEnd:function(c){var b=this,a=b.views[0];if(a.bufferedRenderer){a.bufferedRenderer.scrollTo(b.store.getCount()-1,false,function(e,d){b.afterKeyNavigate(c,d)})}else{b.afterKeyNavigate(c,a.getRecord(a.all.getCount()-1))}},onKeyHome:function(c){var b=this,a=b.views[0];if(a.bufferedRenderer){a.bufferedRenderer.scrollTo(0,false,function(e,d){b.afterKeyNavigate(c,d)})}else{b.afterKeyNavigate(c,a.getRecord(0))}},onKeyPageUp:function(g){var d=this,a=d.views[0],h=d.getRowsVisible(),c,b;if(h){if(a.bufferedRenderer){c=Math.max(g.recordIndex-h,0);(d.lastKeyEvent||(d.lastKeyEvent=new Ext.EventObjectImpl())).setEvent(g.browserEvent);a.bufferedRenderer.scrollTo(c,false,d.afterBufferedScrollTo,d)}else{b=a.walkRecs(g.record,-h);d.afterKeyNavigate(g,b)}}},onKeyPageDown:function(g){var d=this,a=d.views[0],h=d.getRowsVisible(),c,b;if(h){if(a.bufferedRenderer){c=Math.min(g.recordIndex+h,d.store.getCount()-1);(d.lastKeyEvent||(d.lastKeyEvent=new Ext.EventObjectImpl())).setEvent(g.browserEvent);a.bufferedRenderer.scrollTo(c,false,d.afterBufferedScrollTo,d)}else{b=a.walkRecs(g.record,h);d.afterKeyNavigate(g,b)}}},onKeySpace:function(b){var a=this.lastFocused;if(a){this.afterKeyNavigate(b,a)}},onKeyEnter:Ext.emptyFn,onKeyUp:function(b){var a=this.views[0].walkRecs(b.record,-1);if(a){this.afterKeyNavigate(b,a)}},onKeyDown:function(b){var a=this.views[0].walkRecs(b.record,1);if(a){this.afterKeyNavigate(b,a)}},afterBufferedScrollTo:function(b,a){this.afterKeyNavigate(this.lastKeyEvent,a)},scrollByDeltaX:function(d){var a=this.views[0],c=a.up(),b=c.horizontalScroller;if(b){b.scrollByDeltaX(d)}},onKeyLeft:function(a){this.scrollByDeltaX(-this.deltaScroll)},onKeyRight:function(a){this.scrollByDeltaX(this.deltaScroll)},onRowMouseDown:function(b,a,g,c,h){var d=this;if(c!==-1){if(!d.allowRightMouseSelection(h)){return}if(!d.isSelected(a)){d.mousedownAction=true;d.processSelection(b,a,g,c,h)}else{d.mousedownAction=false}}},processSelection:function(b,a,d,c,g){this.selectWithEvent(a,g)},onRowClick:function(b,a,d,c,g){if(this.mousedownAction){this.mousedownAction=false}else{this.processSelection(b,a,d,c,g)}},allowRightMouseSelection:function(a){var b=this.ignoreRightMouseSelection&&a.button!==0;if(b){b=this.hasSelection()}return !b},onSelectChange:function(g,c,k,a){var j=this,l=j.views,d=l.length,b=l[0].indexOf(g),h=c?"select":"deselect",e=0;if((k||j.fireEvent("before"+h,j,g,b))!==false&&a()!==false){for(;e<d;e++){if(c){l[e].onRowSelect(b,k)}else{l[e].onRowDeselect(b,k)}}if(!k){j.fireEvent(h,j,g,b)}}},onLastFocusChanged:function(h,c,b){var a=this.views,g=a.length,e,d=0;if(h){e=a[0].indexOf(h);if(e!=-1){for(;d<g;d++){a[d].onRowFocus(e,false)}}}if(c){e=a[0].indexOf(c);if(e!=-1){for(d=0;d<g;d++){a[d].onRowFocus(e,true,b)}}}this.callParent(arguments)},onEditorTab:function(d,i){var g=this,c=g.views[0],b=d.getActiveRecord(),j=d.getActiveColumn(),a=c.getPosition(b,j),h=i.shiftKey?"left":"right";do{a=c.walkCells(a,h,i,g.preventWrap)}while(a&&(!c.headerCt.getHeaderAtIndex(a.column).getEditor(b)||!d.startEditByPosition(a)))},getCurrentPosition:function(){var a=this.selected.items[0];if(a){return{row:this.store.indexOf(a),column:0}}},selectByPosition:function(a){var b=this.store.getAt(a.row);this.select(b)},selectNext:function(h,c){var g=this,b=g.store,e=g.getSelection(),a=e[e.length-1],d=g.views[0].indexOf(a)+1,i;if(d===b.getCount()||d===0){i=false}else{g.doSelect(d,h,c);i=true}return i},selectPrevious:function(g,b){var e=this,d=e.getSelection(),a=d[0],c=e.views[0].indexOf(a)-1,h;if(c<0){h=false}else{e.doSelect(c,g,b);h=true}return h},isRowSelected:function(a,b){return this.isSelected(a)}});Ext.define("Ext.selection.CheckboxModel",{alias:"selection.checkboxmodel",extend:Ext.selection.RowModel,mode:"MULTI",injectCheckbox:0,checkOnly:false,showHeaderCheckbox:undefined,checkSelector:"."+Ext.baseCSSPrefix+"grid-row-checker",headerWidth:24,checkerOnCls:Ext.baseCSSPrefix+"grid-hd-checker-on",constructor:function(){var a=this;a.callParent(arguments);if(a.mode==="SINGLE"&&a.showHeaderCheckbox!==true){a.showHeaderCheckbox=false}},beforeViewRender:function(c){var d=this,b=d.views,a;d.callParent(arguments);if(Ext.Array.indexOf(b,c)===-1){b.push(c)}if(!d.hasLockedHeader()||c.headerCt.lockedCt){if(d.showHeaderCheckbox!==false){c.headerCt.on("headerclick",d.onHeaderClick,d)}d.addCheckbox(c,true);a=c.ownerCt;if(c.headerCt.lockedCt){a=a.ownerCt}d.mon(a,"reconfigure",d.onReconfigure,d)}},bindComponent:function(a){var b=this;b.sortable=false;b.callParent(arguments)},hasLockedHeader:function(){var a=this.views,c=a.length,b;for(b=0;b<c;b++){if(a[b].headerCt.lockedCt){return true}}return false},addCheckbox:function(a,b){var c=this,d=c.injectCheckbox,e=a.headerCt;if(d!==false){if(d=="first"){d=0}else{if(d=="last"){d=e.getColumnCount()}}Ext.suspendLayouts();if(a.getStore().buffered){c.showHeaderCheckbox=false}e.add(d,c.getHeaderConfig());Ext.resumeLayouts()}if(b!==true){a.refresh()}},onReconfigure:function(c,a,b){if(b){this.addCheckbox(this.views[0])}},toggleUiHeader:function(e){var b=this.views[0],d=b.headerCt,c=d.child("gridcolumn[isCheckerHd]"),a=this.checkerOnCls;if(c){if(e){c.addCls(a)}else{c.removeCls(a)}}},onHeaderClick:function(c,g,b){if(g.isCheckerHd){b.stopEvent();var a=this,d=g.el.hasCls(Ext.baseCSSPrefix+"grid-hd-checker-on");a.preventFocus=true;if(d){a.deselectAll()}else{a.selectAll()}delete a.preventFocus}},getHeaderConfig:function(){var a=this,b=a.showHeaderCheckbox!==false;return{isCheckerHd:b,text:"&#160;",width:a.headerWidth,sortable:false,draggable:false,resizable:false,hideable:false,menuDisabled:true,dataIndex:"",cls:b?Ext.baseCSSPrefix+"column-header-checkbox ":"",renderer:Ext.Function.bind(a.renderer,a),editRenderer:a.editRenderer||a.renderEmpty,locked:a.hasLockedHeader()}},renderEmpty:function(){return"&#160;"},refresh:function(){this.callParent(arguments);this.updateHeaderState()},renderer:function(h,c,b,i,e,d,a){var g=Ext.baseCSSPrefix;c.tdCls=g+"grid-cell-special "+g+"grid-cell-row-checker";return'<div class="'+g+'grid-row-checker">&#160;</div>'},processSelection:function(b,a,h,d,i){var g=this,c=i.getTarget(g.checkSelector),j;if(g.checkOnly&&!c){return}if(c){j=g.getSelectionMode();if(j!=="SINGLE"){g.setSelectionMode("SIMPLE")}g.selectWithEvent(a,i);g.setSelectionMode(j)}else{g.selectWithEvent(a,i)}},onSelectChange:function(){this.callParent(arguments);if(!this.bulkChange){this.updateHeaderState()}},onStoreLoad:function(){this.callParent(arguments);this.updateHeaderState()},onStoreAdd:function(){this.callParent(arguments);this.updateHeaderState()},onStoreRemove:function(){this.callParent(arguments);this.updateHeaderState()},onStoreRefresh:function(){this.callParent(arguments);this.updateHeaderState()},maybeFireSelectionChange:function(a){if(a&&!this.bulkChange){this.updateHeaderState()}this.callParent(arguments)},updateHeaderState:function(){var g=this,h=g.store,e=h.getCount(),j=g.views,k=false,a=0,b,d,c;if(!h.buffered&&e>0){b=g.selected;k=true;for(c=0,d=b.getCount();c<d;++c){if(!g.storeHasSelected(b.getAt(c))){break}++a}k=e===a}if(j&&j.length){g.toggleUiHeader(k)}}});Ext.define("Ext.selection.TreeModel",{extend:Ext.selection.RowModel,alias:"selection.treemodel",constructor:function(a){this.callParent(arguments);if(this.pruneRemoved){this.pruneRemoved=false;this.pruneRemovedNodes=true}},bindStore:function(a,b){var c=this;c.callParent(arguments);if(c.pruneRemovedNodes){c.view.mon(c.treeStore,{remove:c.onNodeRemove,scope:c})}},onNodeRemove:function(b,c,a){if(!a){this.deselectDeletedRecords([c])}},onKeyRight:function(d,b){var c=this.getLastFocused(),a=this.view;if(c){if(c.isExpanded()){this.onKeyDown(d,b)}else{if(c.isExpandable()){if(!a.isTreeView){a=a.lockingPartner}a.expand(c)}}}},onKeyLeft:function(h,c){var d=this,g=this.getLastFocused(),b=this.view,a;if(g){a=g.parentNode;if(g.isExpanded()){if(!b.isTreeView){b=b.lockingPartner}b.collapse(g)}else{if(a&&!a.isRoot()){if(h.shiftKey){d.selectRange(a,g,h.ctrlKey,"up");d.setLastFocused(a)}else{if(h.ctrlKey){d.setLastFocused(a)}else{d.select(a)}}}}}},onKeySpace:function(b,a){if(b.record.data.checked!=null){this.toggleCheck(b)}else{this.callParent(arguments)}},onKeyEnter:function(b,a){if(b.record.data.checked!=null){this.toggleCheck(b)}else{this.callParent(arguments)}},toggleCheck:function(c){var a=this.view,b=this.getLastSelected();c.stopEvent();if(b){if(!a.isTreeView){a=a.lockingPartner}a.onCheckChange(b)}}});Ext.define("Ext.slider.Single",{extend:Ext.slider.Multi,alias:["widget.slider","widget.sliderfield"],alternateClassName:["Ext.Slider","Ext.form.SliderField","Ext.slider.SingleSlider","Ext.slider.Slider"],getValue:function(){return this.callParent([0])},setValue:function(d,b){var c=arguments,a=c.length;if(a==1||(a<=3&&typeof c[1]!="number")){c=Ext.toArray(c);c.unshift(0)}return this.callParent(c)},getNearest:function(){return this.thumbs[0]}});Ext.define("Ext.state.CookieProvider",{extend:Ext.state.Provider,constructor:function(a){var b=this;b.path="/";b.expires=new Date(new Date().getTime()+(1000*60*60*24*7));b.domain=null;b.secure=false;b.callParent(arguments);b.state=b.readCookies()},set:function(a,c){var b=this;if(typeof c=="undefined"||c===null){b.clear(a);return}b.setCookie(a,c);b.callParent(arguments)},clear:function(a){this.clearCookie(a);this.callParent(arguments)},readCookies:function(){var e={},j=document.cookie+";",d=/\s?(.*?)=(.*?);/g,i=this.prefix,a=i.length,h,b,g;while((h=d.exec(j))!=null){b=h[1];g=h[2];if(b&&b.substring(0,a)==i){e[b.substr(a)]=this.decodeValue(g)}}return e},setCookie:function(a,c){var b=this;document.cookie=b.prefix+a+"="+b.encodeValue(c)+((b.expires==null)?"":("; expires="+b.expires.toGMTString()))+((b.path==null)?"":("; path="+b.path))+((b.domain==null)?"":("; domain="+b.domain))+((b.secure==true)?"; secure":"")},clearCookie:function(a){var b=this;document.cookie=b.prefix+a+"=null; expires=Thu, 01-Jan-70 00:00:01 GMT"+((b.path==null)?"":("; path="+b.path))+((b.domain==null)?"":("; domain="+b.domain))+((b.secure==true)?"; secure":"")}});Ext.define("Ext.state.LocalStorageProvider",{extend:Ext.state.Provider,alias:"state.localstorage",constructor:function(){var a=this;a.callParent(arguments);a.store=a.getStorageObject();if(a.store){a.state=a.readLocalStorage()}else{a.state={}}},readLocalStorage:function(){var c=this.store,e=0,a=c.length,h=this.prefix,b=h.length,g={},d;for(;e<a;++e){d=c.key(e);if(d.substring(0,b)==h){g[d.substr(b)]=this.decodeValue(c.getItem(d))}}return g},set:function(a,c){var b=this;b.clear(a);if(typeof c=="undefined"||c===null){return}b.store.setItem(b.prefix+a,b.encodeValue(c));b.callParent(arguments)},clear:function(a){this.store.removeItem(this.prefix+a);this.callParent(arguments)},getStorageObject:function(){if(Ext.supports.LocalStorage){return window.localStorage}return false}});Ext.define("Ext.tab.Panel",{extend:Ext.panel.Panel,alias:"widget.tabpanel",alternateClassName:["Ext.TabPanel"],tabPosition:"top",removePanelHeader:true,plain:false,itemCls:Ext.baseCSSPrefix+"tabpanel-child",minTabWidth:undefined,maxTabWidth:undefined,deferredRender:true,initComponent:function(){var d=this,c=[].concat(d.dockedItems||[]),a=d.activeTab||(d.activeTab=0),b=d.tabPosition;d.layout=new Ext.layout.container.Card(Ext.apply({owner:d,deferredRender:d.deferredRender,itemCls:d.itemCls,activeItem:a},d.layout));d.tabBar=new Ext.tab.Bar(Ext.apply({dock:d.tabPosition,orientation:(b=="top"||b=="bottom")?"horizontal":"vertical",plain:d.plain,cardLayout:d.layout,tabPanel:d},d.tabBar));c.push(d.tabBar);d.dockedItems=c;d.addEvents("beforetabchange","tabchange");d.callParent(arguments);a=d.activeTab=d.getComponent(a);if(a){d.tabBar.setActiveTab(a.tab,true)}},setActiveTab:function(a){var c=this,b;a=c.getComponent(a);if(a){b=c.getActiveTab();if(b!==a&&c.fireEvent("beforetabchange",c,a,b)===false){return false}if(!a.isComponent){Ext.suspendLayouts();a=c.add(a);Ext.resumeLayouts()}c.activeTab=a;Ext.suspendLayouts();c.layout.setActiveItem(a);a=c.activeTab=c.layout.getActiveItem();if(a&&a!==b){c.tabBar.setActiveTab(a.tab);Ext.resumeLayouts(true);if(b!==a){c.fireEvent("tabchange",c,a,b)}}else{Ext.resumeLayouts(true)}return a}},getActiveTab:function(){var b=this,a=b.getComponent(b.activeTab);if(a&&b.items.indexOf(a)!=-1){b.activeTab=a}else{b.activeTab=null}return b.activeTab},getTabBar:function(){return this.tabBar},onAdd:function(e,c){var d=this,b=e.tabConfig||{},a={xtype:"tab",card:e,disabled:e.disabled,closable:e.closable,hidden:e.hidden&&!e.hiddenByLayout,tooltip:e.tooltip,tabBar:d.tabBar,position:d.tabPosition,closeText:e.closeText};b=Ext.applyIf(b,a);e.tab=d.tabBar.insert(c,b);e.on({scope:d,enable:d.onItemEnable,disable:d.onItemDisable,beforeshow:d.onItemBeforeShow,iconchange:d.onItemIconChange,iconclschange:d.onItemIconClsChange,titlechange:d.onItemTitleChange});if(e.isPanel){if(d.removePanelHeader){if(e.rendered){if(e.header){e.header.hide()}}else{e.header=false}}if(e.isPanel&&d.border){e.setBorder(false)}}},onItemEnable:function(a){a.tab.enable()},onItemDisable:function(a){a.tab.disable()},onItemBeforeShow:function(a){if(a!==this.activeTab){this.setActiveTab(a);return false}},onItemIconChange:function(b,a){b.tab.setIcon(a)},onItemIconClsChange:function(b,a){b.tab.setIconCls(a)},onItemTitleChange:function(a,b){a.tab.setText(b)},doRemove:function(d,b){var c=this,a;if(c.destroying||c.items.getCount()==1){c.activeTab=null}else{if((a=c.tabBar.items.indexOf(c.tabBar.findNextActivatable(d.tab)))!==-1){c.setActiveTab(a)}}this.callParent(arguments);delete d.tab.card;delete d.tab},onRemove:function(b,c){var a=this;b.un({scope:a,enable:a.onItemEnable,disable:a.onItemDisable,beforeshow:a.onItemBeforeShow});if(!a.destroying&&b.tab.ownerCt===a.tabBar){a.tabBar.remove(b.tab)}}});Ext.define("Ext.toolbar.Spacer",{extend:Ext.Component,alias:"widget.tbspacer",alternateClassName:"Ext.Toolbar.Spacer",baseCls:Ext.baseCSSPrefix+"toolbar-spacer",focusable:false});Ext.define("Ext.tree.Panel",{extend:Ext.panel.Table,alias:"widget.treepanel",alternateClassName:["Ext.tree.TreePanel","Ext.TreePanel"],viewType:"treeview",selType:"treemodel",treeCls:Ext.baseCSSPrefix+"tree-panel",deferRowRender:false,rowLines:false,lines:true,useArrows:false,singleExpand:false,ddConfig:{enableDrag:true,enableDrop:true},rootVisible:true,displayField:"text",root:null,normalCfgCopy:["displayField","root","singleExpand","useArrows","lines","rootVisible","scroll"],lockedCfgCopy:["displayField","root","singleExpand","useArrows","lines","rootVisible"],isTree:true,arrowCls:Ext.baseCSSPrefix+"tree-arrows",linesCls:Ext.baseCSSPrefix+"tree-lines",noLinesCls:Ext.baseCSSPrefix+"tree-no-lines",autoWidthCls:Ext.baseCSSPrefix+"autowidth-table",constructor:function(a){a=a||{};if(a.animate===undefined){a.animate=Ext.isDefined(this.animate)?this.animate:Ext.enableFx}this.enableAnimations=a.animate;delete a.animate;this.callParent([a])},initComponent:function(){var d=this,b=[d.treeCls],c=d.store,a;if(d.useArrows){b.push(d.arrowCls);d.lines=false}if(d.lines){b.push(d.linesCls)}else{if(!d.useArrows){b.push(d.noLinesCls)}}if(Ext.isString(c)){c=d.store=Ext.StoreMgr.lookup(c)}else{if(!c||Ext.isObject(c)&&!c.isStore){c=d.store=new Ext.data.TreeStore(Ext.apply({root:d.root,fields:d.fields,model:d.model,folderSort:d.folderSort},c))}else{if(d.root){c=d.store=Ext.data.StoreManager.lookup(c);c.setRootNode(d.root);if(d.folderSort!==undefined){c.folderSort=d.folderSort;c.sort()}}}}d.viewConfig=Ext.apply({rootVisible:d.rootVisible,animate:d.enableAnimations,singleExpand:d.singleExpand,node:c.getRootNode(),hideHeaders:d.hideHeaders},d.viewConfig);if(!d.columns){if(d.initialConfig.hideHeaders===undefined){d.hideHeaders=true}d.addCls(d.autoWidthCls);d.columns=[{xtype:"treecolumn",text:"Name",width:Ext.isIE6?"100%":10000,dataIndex:d.displayField}]}if(d.cls){b.push(d.cls)}d.cls=b.join(" ");d.callParent();d.selModel.treeStore=d.store;a=d.getView();d.relayEvents(a,["checkchange","afteritemexpand","afteritemcollapse"]);if(!a.isLockingView){if(!a.rootVisible&&!d.getRootNode()){d.setRootNode({expanded:true})}}},bindStore:function(a){var b=this;b.store=a;b.storeListeners=b.mon(a,{destroyable:true,load:b.onStoreLoad,rootchange:b.onRootChange,clear:b.onClear,scope:b});b.storeRelayers=b.relayEvents(a,["beforeload","load"]);b.storeRelayers1=b.mon(a,{destroyable:true,append:b.createRelayer("itemappend"),remove:b.createRelayer("itemremove"),move:b.createRelayer("itemmove",[0,4]),insert:b.createRelayer("iteminsert"),beforeappend:b.createRelayer("beforeitemappend"),beforeremove:b.createRelayer("beforeitemremove"),beforemove:b.createRelayer("beforeitemmove"),beforeinsert:b.createRelayer("beforeiteminsert"),expand:b.createRelayer("itemexpand",[0,1]),collapse:b.createRelayer("itemcollapse",[0,1]),beforeexpand:b.createRelayer("beforeitemexpand",[0,1]),beforecollapse:b.createRelayer("beforeitemcollapse",[0,1])});a.ownerTree=b},unbindStore:function(){var b=this,a=b.store;if(a){Ext.destroy(b.storeListeners,b.storeRelayers,b.storeRelayers1);delete a.ownerTree}},onClear:function(){this.view.onClear()},setRootNode:function(){return this.store.setRootNode.apply(this.store,arguments)},getRootNode:function(){return this.store.getRootNode()},onRootChange:function(a){this.view.setRootNode(a)},getChecked:function(){return this.getView().getChecked()},isItemChecked:function(a){return a.get("checked")},expandNode:function(b,a,d,c){return this.getView().expand(b,a,d,c||this)},collapseNode:function(b,a,d,c){return this.getView().collapse(b,a,d,c||this)},expandAll:function(e,c){var d=this,a=d.getRootNode(),b=d.enableAnimations;if(a){if(!b){Ext.suspendLayouts()}a.expand(true,e,c||d);if(!b){Ext.resumeLayouts(true)}}},collapseAll:function(g,d){var e=this,b=e.getRootNode(),c=e.enableAnimations,a=e.getView();if(b){if(!c){Ext.suspendLayouts()}d=d||e;if(a.rootVisible){b.collapse(true,g,d)}else{b.collapseChildren(true,g,d)}if(!c){Ext.resumeLayouts(true)}}},expandPath:function(l,g,a,h,k){var d=this,c=d.getRootNode(),b=1,e=d.getView(),j,i;g=g||d.getRootNode().idProperty;a=a||"/";if(Ext.isEmpty(l)){Ext.callback(h,k||d,[false,null]);return}j=l.split(a);if(c.get(g)!=j[1]){Ext.callback(h,k||d,[false,c]);return}i=function(){if(++b===j.length){Ext.callback(h,k||d,[true,c]);return}var m=c.findChild(g,j[b]);if(!m){Ext.callback(h,k||d,[false,c]);return}c=m;c.expand(false,i)};c.expand(false,i)},selectPath:function(j,d,a,g,i){var b=this,c,h,e;d=d||b.getRootNode().idProperty;a=a||"/";h=j.split(a);e=h.pop();if(h.length>1){b.expandPath(h.join(a),d,a,function(m,l){var k=l;if(m&&l){l=l.findChild(d,e);if(l){b.getSelectionModel().select(l);Ext.callback(g,i||b,[true,l]);return}}Ext.callback(g,i||b,[false,k])},b)}else{c=b.getRootNode();if(c.getId()===e){b.getSelectionModel().select(c);Ext.callback(g,i||b,[true,c])}else{Ext.callback(g,i||b,[false,null])}}}});Ext.define("Ext.view.DragZone",{extend:Ext.dd.DragZone,containerScroll:false,constructor:function(b){var e=this,a,d,c;Ext.apply(e,b);if(!e.ddGroup){e.ddGroup="view-dd-zone-"+e.view.id}a=e.view;d=a.ownerCt;if(d){c=d.getTargetEl().dom}else{c=a.el.dom.parentNode}e.callParent([c]);e.ddel=Ext.get(document.createElement("div"));e.ddel.addCls(Ext.baseCSSPrefix+"grid-dd-wrap")},init:function(c,a,b){this.initTarget(c,a,b);this.view.mon(this.view,{itemmousedown:this.onItemMouseDown,scope:this})},onValidDrop:function(b,a,c){this.callParent();b.el.focus()},onItemMouseDown:function(b,a,d,c,g){if(!this.isPreventDrag(g,a,d,c)){this.view.focus();this.handleMouseDown(g)}},isPreventDrag:function(a){return false},getDragData:function(c){var a=this.view,b=c.getTarget(a.getItemSelector());if(b){return{copy:a.copy||(a.allowCopy&&c.ctrlKey),event:new Ext.EventObjectImpl(c),view:a,ddel:this.ddel,item:b,records:a.getSelectionModel().getSelection(),fromPosition:Ext.fly(b).getXY()}}},onInitDrag:function(b,h){var e=this,g=e.dragData,d=g.view,a=d.getSelectionModel(),c=d.getRecord(g.item);if(!a.isSelected(c)){a.select(c,true)}g.records=a.getSelection();e.ddel.update(e.getDragText());e.proxy.update(e.ddel.dom);e.onStartDrag(b,h);return true},getDragText:function(){var a=this.dragData.records.length;return Ext.String.format(this.dragText,a,a==1?"":"s")},getRepairXY:function(b,a){return a?a.fromPosition:false}});Ext.define("Ext.tree.ViewDragZone",{extend:Ext.view.DragZone,isPreventDrag:function(b,a){return(a.get("allowDrag")===false)||!!b.getTarget(this.view.expanderSelector)},getDragText:function(){var a=this.dragData.records,b=a.length,d=a[0].get(this.displayField),c="s";if(b===1&&d){return d}else{if(!d){c=""}}return Ext.String.format(this.dragText,b,c)},afterRepair:function(){var h=this,a=h.view,i=a.selectedItemCls,b=h.dragData.records,g,e=b.length,c=Ext.fly,d;if(Ext.enableFx&&h.repairHighlight){for(g=0;g<e;g++){d=a.getNode(b[g]);c(d.firstChild).highlight(h.repairHighlightColor,{listeners:{beforeanimate:function(){if(a.isSelected(d)){c(d).removeCls(i)}},afteranimate:function(){if(a.isSelected(d)){c(d).addCls(i)}}}})}}h.dragging=false}});Ext.define("Ext.tree.ViewDropZone",{extend:Ext.view.DropZone,allowParentInserts:false,allowContainerDrops:false,appendOnly:false,expandDelay:500,indicatorCls:Ext.baseCSSPrefix+"tree-ddindicator",expandNode:function(b){var a=this.view;this.expandProcId=false;if(!b.isLeaf()&&!b.isExpanded()){a.expand(b);this.expandProcId=false}},queueExpand:function(a){this.expandProcId=Ext.Function.defer(this.expandNode,this.expandDelay,this,[a])},cancelExpand:function(){if(this.expandProcId){clearTimeout(this.expandProcId);this.expandProcId=false}},getPosition:function(g,b){var j=this.view,c=j.getRecord(b),h=g.getPageY(),k=c.isLeaf(),a=false,i=Ext.fly(b).getRegion(),d;if(c.isRoot()){return"append"}if(this.appendOnly){return k?false:"append"}if(!this.allowParentInserts){a=c.hasChildNodes()&&c.isExpanded()}d=(i.bottom-i.top)/(k?2:3);if(h>=i.top&&h<(i.top+d)){return"before"}else{if(!a&&(k||(h>=(i.bottom-d)&&h<=i.bottom))){return"after"}else{return"append"}}},isValidDropPoint:function(b,j,n,k,g){if(!b||!g.item){return false}var o=this.view,l=o.getRecord(b),d=g.records,a=d.length,m=d.length,c,h;if(!(l&&j&&a)){return false}for(c=0;c<m;c++){h=d[c];if(h.isNode&&h.contains(l)){return false}}if(j==="append"&&l.get("allowDrop")===false){return false}else{if(j!="append"&&l.parentNode.get("allowDrop")===false){return false}}if(Ext.Array.contains(d,l)){return false}return o.fireEvent("nodedragover",l,j,g,k)!==false},onNodeOver:function(a,i,g,c){var d=this.getPosition(g,a),b=this.dropNotAllowed,j=this.view,h=j.getRecord(a),k=this.getIndicator(),l=0;this.cancelExpand();if(d=="append"&&!this.expandProcId&&!Ext.Array.contains(c.records,h)&&!h.isLeaf()&&!h.isExpanded()){this.queueExpand(h)}if(this.isValidDropPoint(a,d,i,g,c)){this.valid=true;this.currentPosition=d;this.overRecord=h;k.setWidth(Ext.fly(a).getWidth());l=Ext.fly(a).getY()-Ext.fly(j.el).getY()-1;if(d=="before"){b=h.isFirst()?Ext.baseCSSPrefix+"tree-drop-ok-above":Ext.baseCSSPrefix+"tree-drop-ok-between";k.showAt(0,l);i.proxy.show()}else{if(d=="after"){b=h.isLast()?Ext.baseCSSPrefix+"tree-drop-ok-below":Ext.baseCSSPrefix+"tree-drop-ok-between";l+=Ext.fly(a).getHeight();k.showAt(0,l);i.proxy.show()}else{b=Ext.baseCSSPrefix+"tree-drop-ok-append";k.hide()}}}else{this.valid=false}this.currentCls=b;return b},onNodeOut:function(d,a,c,b){this.valid=false;this.getIndicator().hide()},onContainerOver:function(a,c,b){return c.getTarget("."+this.indicatorCls)?this.currentCls:this.dropNotAllowed},notifyOut:function(){this.callParent(arguments);this.cancelExpand()},handleNodeDrop:function(g,n,j){var p=this,a=p.view,k=n?n.parentNode:a.panel.getRootNode(),b=a.getStore().treeStore.model,c,e,m,h,d,l,o,q;if(g.copy){c=g.records;g.records=[];for(e=0,m=c.length;e<m;e++){h=c[e];if(h.isNode){g.records.push(h.copy(undefined,true))}else{g.records.push(new b(h[h.persistenceProperty],h.getId()))}}}p.cancelExpand();if(j=="before"){d=k.insertBefore;l=[null,n];n=k}else{if(j=="after"){if(n.nextSibling){d=k.insertBefore;l=[null,n.nextSibling]}else{d=k.appendChild;l=[null]}n=k}else{if(!(n.isExpanded()||n.isLoading())){o=true}d=n.appendChild;l=[null]}}q=function(){var i,r;Ext.suspendLayouts();a.getSelectionModel().clearSelections();for(e=0,m=g.records.length;e<m;e++){l[0]=g.records[e];d.apply(n,l)}if(p.sortOnDrop){n.sort(n.getOwnerTree().store.generateComparator())}Ext.resumeLayouts(true);if(Ext.enableFx&&p.dropHighlight){i=p.dropHighlightColor;for(e=0;e<m;e++){r=a.getNode(g.records[e]);if(r){Ext.fly(r).highlight(i)}}}};if(o){n.expand(false,q)}else{if(n.isLoading()){n.on({expand:q,delay:1,single:true})}else{q()}}}});Ext.define("Ext.tree.plugin.TreeViewDragDrop",{extend:Ext.AbstractPlugin,alias:"plugin.treeviewdragdrop",dragText:"{0} selected node{1}",allowParentInserts:false,allowContainerDrops:false,appendOnly:false,ddGroup:"TreeDD",containerScroll:false,expandDelay:1000,enableDrop:true,enableDrag:true,nodeHighlightColor:"c3daf9",nodeHighlightOnDrop:Ext.enableFx,nodeHighlightOnRepair:Ext.enableFx,displayField:"text",init:function(a){a.on("render",this.onViewRender,this,{single:true})},destroy:function(){Ext.destroy(this.dragZone,this.dropZone)},onViewRender:function(a){var b=this,c;if(b.enableDrag){if(b.containerScroll){c=a.getEl()}b.dragZone=new Ext.tree.ViewDragZone({view:a,ddGroup:b.dragGroup||b.ddGroup,dragText:b.dragText,displayField:b.displayField,repairHighlightColor:b.nodeHighlightColor,repairHighlight:b.nodeHighlightOnRepair,scrollEl:c})}if(b.enableDrop){b.dropZone=new Ext.tree.ViewDropZone({view:a,ddGroup:b.dropGroup||b.ddGroup,allowContainerDrops:b.allowContainerDrops,appendOnly:b.appendOnly,allowParentInserts:b.allowParentInserts,expandDelay:b.expandDelay,dropHighlightColor:b.nodeHighlightColor,dropHighlight:b.nodeHighlightOnDrop,sortOnDrop:b.sortOnDrop,containerScroll:b.containerScroll})}}},function(){var a=this.prototype;a.nodeHighlightOnDrop=a.nodeHighlightOnRepair=Ext.enableFx});Ext.define("Ext.util.Cookies",{singleton:true,set:function(c,e){var a=arguments,i=arguments.length,b=(i>2)?a[2]:null,h=(i>3)?a[3]:"/",d=(i>4)?a[4]:null,g=(i>5)?a[5]:false;document.cookie=c+"="+escape(e)+((b===null)?"":("; expires="+b.toGMTString()))+((h===null)?"":("; path="+h))+((d===null)?"":("; domain="+d))+((g===true)?"; secure":"")},get:function(d){var b=d+"=",g=b.length,a=document.cookie.length,e=0,c=0;while(e<a){c=e+g;if(document.cookie.substring(e,c)==b){return this.getCookieVal(c)}e=document.cookie.indexOf(" ",e)+1;if(e===0){break}}return null},clear:function(a,b){if(this.get(a)){b=b||"/";document.cookie=a+"=; expires=Thu, 01-Jan-70 00:00:01 GMT; path="+b}},getCookieVal:function(b){var a=document.cookie.indexOf(";",b);if(a==-1){a=document.cookie.length}return unescape(document.cookie.substring(b,a))}});Ext.define("Ext.util.Grouper",{extend:Ext.util.Sorter,isGrouper:true,getGroupString:function(a){return a.get(this.property)}});Ext.define("Ext.util.History",{singleton:true,alternateClassName:"Ext.History",mixins:{observable:Ext.util.Observable},useTopWindow:true,fieldId:Ext.baseCSSPrefix+"history-field",iframeId:Ext.baseCSSPrefix+"history-frame",constructor:function(){var a=this;a.oldIEMode=Ext.isIE7m||!Ext.isStrict&&Ext.isIE8;a.iframe=null;a.hiddenField=null;a.ready=false;a.currentToken=null;a.mixins.observable.constructor.call(a)},getHash:function(){var a=window.location.href,b=a.indexOf("#");return b>=0?a.substr(b+1):null},setHash:function(d){var a=this,c=a.useTopWindow?window.top:window;try{c.location.hash=d}catch(b){}},doSave:function(){this.hiddenField.value=this.currentToken},handleStateChange:function(a){this.currentToken=a;this.fireEvent("change",a)},updateIFrame:function(b){var a='<html><body><div id="state">'+Ext.util.Format.htmlEncode(b)+"</div></body></html>",d;try{d=this.iframe.contentWindow.document;d.open();d.write(a);d.close();return true}catch(c){return false}},checkIFrame:function(){var d=this,b=d.iframe.contentWindow,e,c,a,g;if(!b||!b.document){Ext.Function.defer(this.checkIFrame,10,this);return}e=b.document;c=e.getElementById("state");a=c?c.innerText:null;g=d.getHash();Ext.TaskManager.start({run:function(){var k=b.document,j=k.getElementById("state"),h=j?j.innerText:null,i=d.getHash();if(h!==a){a=h;d.handleStateChange(h);d.setHash(h);g=h;d.doSave()}else{if(i!==g){g=i;d.updateIFrame(i)}}},interval:50,scope:d});d.ready=true;d.fireEvent("ready",d)},startUp:function(){var a=this,b;a.currentToken=a.hiddenField.value||this.getHash();if(a.oldIEMode){a.checkIFrame()}else{b=a.getHash();Ext.TaskManager.start({run:function(){var c=a.getHash();if(c!==b){b=c;a.handleStateChange(b);a.doSave()}},interval:50,scope:a});a.ready=true;a.fireEvent("ready",a)}},init:function(d,b){var c=this,a=Ext.DomHelper;if(c.ready){Ext.callback(d,b,[c]);return}if(!Ext.isReady){Ext.onReady(function(){c.init(d,b)});return}c.hiddenField=Ext.getDom(c.fieldId);if(!c.hiddenField){c.hiddenField=Ext.getBody().createChild({id:Ext.id(),tag:"form",cls:Ext.baseCSSPrefix+"hide-display",children:[{tag:"input",type:"hidden",id:c.fieldId}]},false,true).firstChild}if(c.oldIEMode){c.iframe=Ext.getDom(c.iframeId);if(!c.iframe){c.iframe=a.append(c.hiddenField.parentNode,{tag:"iframe",id:c.iframeId,src:Ext.SSL_SECURE_URL})}}c.addEvents("ready","change");if(d){c.on("ready",d,b,{single:true})}c.startUp()},add:function(a,c){var b=this;if(c!==false){if(b.getToken()===a){return true}}if(b.oldIEMode){return b.updateIFrame(a)}else{b.setHash(a);return true}},back:function(){window.history.go(-1)},forward:function(){window.history.go(1)},getToken:function(){return this.ready?this.currentToken:this.getHash()}});